21 #ifndef F_CODEVIEW_CODEVIEW_H
22 #define F_CODEVIEW_CODEVIEW_H
24 #include <gui/control.h>
57 EI_CONTENT_CHANGED = 0x0001,
58 EI_ENTER_PRESSED = 0x0002,
59 EI_ESC_PRESSED = 0x0004,
60 EI_FOCUS_LOST = 0x0008,
61 EI_CURSOR_MOVED = 0x0010,
62 EI_SELECTION_CHANGED = 0x0020
66 CodeView(
const os::Rect&,
const os::String& name,
const os::String& buffer,
67 uint32 resizeMask=os::CF_FOLLOW_LEFT||os::CF_FOLLOW_TOP,
68 uint32 flags=os::WID_WILL_DRAW || os::WID_FULL_UPDATE_ON_RESIZE );
70 void Paint(
const os::Rect& );
95 void Clear(
bool sendNotify=
true);
96 void Set(
const char *text,
bool sendNotify=
true);
97 void Insert(
const char *text,
bool sendNotify=
true);
98 void Insert(
const os::IPoint &pos,
const char *text,
bool sendNotify=
true);
100 void Select(
const os::IPoint &start,
const os::IPoint &end,
bool sendNotify=
true);
104 void SetCursor(
int x,
int y,
bool select=
false,
bool sendNotify=
true);
105 void SetCursor(
const os::IPoint &pos,
bool select=
false,
bool sendNotify=
true);
110 void Cut(
bool sendNotify=
true);
112 void Paste(
bool sendNotify=
true);
113 void Delete(
bool sendNotify=
true);
114 void Delete(
const os::IPoint &start,
const os::IPoint &end,
bool sendNotify=
true);
129 void SetShowLineNumbers(
bool bShowLN );
130 bool GetShowLineNumbers();
133 const os::String&
GetLine(uint i)
const;
134 void SetLine(
const os::String &text, uint i);
136 bool Undo(
bool sendNotify=
true);
137 bool Redo(
bool sendNotify=
true);
151 void SetLineNumberFgColor(os::Color32_s);
152 os::Color32_s GetLineNumberFgColor();
154 void SetLineNumberBgColor(os::Color32_s);
155 os::Color32_s GetLineNumberBgColor();
157 void SetLineBackColor(os::Color32_s);
158 os::Color32_s GetLineBackColor();
160 os::Font* GetEditorFont()
const;
161 void SetContextMenu( os::Menu * pcMenu );
165 virtual void MouseUp(
const os::Point&, uint32, os::Message*);
169 os::ScrollBar *vScroll, *hScroll;