Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages | Examples

fgl::FGTextEditor Class Reference

#include <widgets.h>

Inheritance diagram for fgl::FGTextEditor:

Inheritance graph
[legend]
Collaboration diagram for fgl::FGTextEditor:

Collaboration graph
[legend]
List of all members.

Detailed Description

An andvanced widget to edit the plain text files or create the new one. It has a traditional Open, Save & Close menu and simply search engine.

tedit.png
Examples:

editor.cpp.


Public Types

enum  { FGMAX_LINE = 32768, FGMAX_LINESIZE = 512 }

Public Member Functions

 FGTextEditor (FGTextEditor **e=0, char *arg="Untitled", int font=FONT0816, int ink=CGRAY3, int paper=CBLACK, int flags=WSTANDARD|WMENU|WSTATUSBAR|WSIZEABLE|WNOTIFY|WMINIMIZE|WUSELAST|WNOPICTO)
void __fastcall ShowBuffer (int top=0)
void __fastcall NewBuffer (void)
void __fastcall OpenBuffer (char *s)
void __fastcall ReopenBuffer (void)
void __fastcall SaveBuffer (void)
void __fastcall SaveAsBuffer (char *s)
void __fastcall Close (void)
void __fastcall Goto (int)
void __fastcall ReadOnlyMode (void)
void __fastcall SetFocus (void)
int __fastcall AppendLine (char *str)

Protected Member Functions

void __fastcall file (void)
int __fastcall _memcmp (unsigned char *from, unsigned char *co, unsigned kolko, unsigned l)
int __fastcall Find (int from, int count, int size)
void __fastcall Clear (void)
void __fastcall _goto (void)
void __fastcall search (void)
void __fastcall options (void)
FGLINE *__fastcall create_line (char *s, int at)
void __fastcall Init (void)
void __fastcall SaveAsBuffer2 (void)
void __fastcall OpenBuffer2 (void)
void __fastcall ShowCursor (int trigger)
void __fastcall ShowLine (int scr, char *s)
int __fastcall isempty (char *s)
void __fastcall CKey (int k)
void __fastcall Key (int k)
void __fastcall SaveChanges (void)
void __fastcall Open (char *s)
void __fastcall Destruct (void)

Static Protected Member Functions

static void SearchProc (FGEvent *p)
static void SetFont (CallBack)
static void OptionsProc (FGEvent *p)
static void file_proc (CallBack)
static char *__fastcall terminate (char *s)
static void OpenBuffer1 (char *s, FGFileDialog *)
static void SaveAsBuffer1 (char *s, FGFileDialog *)
static void Text_EditorProc (FGEvent *p)

Protected Attributes

FGWindowText_EditorPtr
FGWindowOptionsPtr
FGWindowString_SearchPtr
int lfonly
int font_save
FGBUFFER buf
FGLINE text [FGMAX_LINE]
char s [1028]
int WX
int WY
char srch_str [33]
int last_found
int _font
int TABSIZE
int nodraw
int inblock
int ronly
int X
int Y
int W
int H
FGTextEditor ** self


Constructor & Destructor Documentation

fgl::FGTextEditor::FGTextEditor FGTextEditor **  me = 0,
char *  arg = "Untitled",
int  font = FONT0816,
int  ink = CGRAY3,
int  paper = CBLACK,
int  flags = WSTANDARD|WMENU|WSTATUSBAR|WSIZEABLE|WNOTIFY|WMINIMIZE|WUSELAST|WNOPICTO
 

Open the text editor with contents of file 'arg'. The colors and font is optionally.


Member Function Documentation

int __fastcall fgl::FGTextEditor::AppendLine char *  str  ) 
 

Append this line at the end of text buffer.

void __fastcall fgl::FGTextEditor::Close void   ) 
 

Close the editor.

void __fastcall fgl::FGTextEditor::Goto int  l  ) 
 

Goto to the line 'l'.

void __fastcall fgl::FGTextEditor::NewBuffer void   ) 
 

Reinitialize editor. Clear the window & text buffer. All changes will be lost.

void __fastcall fgl::FGTextEditor::OpenBuffer char *  s  ) 
 

Open new text file with the name 's' in the editor immediatelly.

void __fastcall fgl::FGTextEditor::ReadOnlyMode void   )  [inline]
 

Don't allow any changes on the file. View mode only.

void __fastcall fgl::FGTextEditor::ReopenBuffer void   ) 
 

Reopen the buffer from the file. All changes will be lost.

void __fastcall fgl::FGTextEditor::SaveAsBuffer char *  s  ) 
 

Save editor's text to this filename.

Parameters:
s a new filename

void __fastcall fgl::FGTextEditor::SaveBuffer void   ) 
 

Save editor's text to its file.

void __fastcall fgl::FGTextEditor::SetFocus void   )  [inline]
 

Move the editor at the top of all opened windows.

void __fastcall fgl::FGTextEditor::ShowBuffer int  top = 0  ) 
 

Refresh visuals.

Parameters:
top goto to the start if true.


Generated on Wed Feb 9 11:31:58 2005 for OpenGUI by  doxygen 1.4.0