Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RichTextBox Class Reference

#include <RichTextBox.h>

Inheritance diagram for RichTextBox:
ScrollWindow ActiveWindow Window EventTarget

List of all members.

Public Member Functions

 RichTextBox (ActiveWindow *p, int ax, int ay, int aw, int ah, DWORD aid=0, DWORD astyle=0)
 RichTextBox (Screen *s, int ax, int ay, int aw, int ah, DWORD aid=0, DWORD astyle=0)
virtual ~RichTextBox ()
int operator== (const RichTextBox &w) const
virtual void DrawContent (const Rect &ctrl_rect)
virtual void SetText (const char *t)
virtual int OnMouseMove (int x, int y)
virtual int OnLButtonDown (int x, int y)
virtual int OnLButtonUp (int x, int y)
virtual int OnMouseWheel (int wheel)
virtual int OnClick ()
virtual int OnKeyDown (int vk, int flags)
- Public Member Functions inherited from ScrollWindow
 ScrollWindow (ActiveWindow *p, int ax, int ay, int aw, int ah, DWORD aid, DWORD style=0, ActiveWindow *parent=0)
 ScrollWindow (Screen *s, int ax, int ay, int aw, int ah, DWORD aid, DWORD style=0, ActiveWindow *parent=0)
virtual ~ScrollWindow ()
virtual void Paint ()
virtual void Draw ()
virtual void DrawTransparent ()
virtual void DrawTransparentContent (const Rect &ctrl_rect)
virtual void DrawScrollBar ()
virtual void MoveTo (const Rect &r)
virtual int OnDragStart (int x, int y)
virtual int OnDragDrop (int x, int y, ActiveWindow *source)
virtual int GetLineHeight ()
virtual void SetLineHeight (int h)
virtual int GetLeading ()
virtual void SetLeading (int nNewValue)
virtual int GetScrollBarVisible ()
virtual void SetScrollBarVisible (int nNewValue)
virtual int GetDragDrop ()
virtual void SetDragDrop (int nNewValue)
virtual bool GetSmoothScroll ()
virtual void SetSmoothScroll (bool s)
virtual bool IsScrollVisible ()
virtual bool CanScroll (int direction, int nlines=1)
virtual void EnsureVisible (int index)
virtual void Scroll (int direction, int nlines=1)
virtual void SmoothScroll (int direction, double nlines)
virtual void ScrollTo (int index)
virtual int GetTopIndex ()
virtual int GetLineCount ()
virtual int GetPageCount ()
virtual int GetPageSize ()
virtual int GetScrollTrack ()
int IsDragging () const
int IsSelecting () const
int IsScrolling () const
- Public Member Functions inherited from ActiveWindow
 ActiveWindow (Screen *s, int ax, int ay, int aw, int ah, DWORD id=0, DWORD style=0, ActiveWindow *parent=0)
virtual ~ActiveWindow ()
int operator== (const ActiveWindow &w) const
virtual void Show ()
virtual void Hide ()
virtual void UseLayout (const std::vector< DWORD > &min_x, const std::vector< DWORD > &min_y, const std::vector< float > &weight_x, const std::vector< float > &weight_y)
virtual void UseLayout (const std::vector< float > &min_x, const std::vector< float > &min_y, const std::vector< float > &weight_x, const std::vector< float > &weight_y)
virtual void UseLayout (int ncols, int nrows, int *min_x, int *min_y, float *weight_x, float *weight_y)
virtual void DoLayout ()
virtual int OnSelect ()
virtual int OnRButtonDown (int x, int y)
virtual int OnRButtonUp (int x, int y)
virtual int OnMouseEnter (int x, int y)
virtual int OnMouseExit (int x, int y)
virtual const char * GetDescription () const
virtual ActiveWindowFindControl (int x, int y)
virtual Rect TargetRect () const
virtual ActiveWindowGetCapture ()
virtual int SetCapture ()
virtual int ReleaseCapture ()
virtual void SetFocus ()
virtual void KillFocus ()
virtual bool HasFocus () const
void SetEnabled (bool e=true)
bool IsEnabled () const
bool IsVisible () const
DWORD GetID () const
void SetStyle (DWORD s)
DWORD GetStyle () const
void SetText (const Text &t)
void AddText (const char *t)
void AddText (const Text &t)
const TextGetText () const
void SetAltText (const char *t)
void SetAltText (const Text &t)
const TextGetAltText () const
void SetTexture (Bitmap *bmp)
BitmapGetTexture ()
void SetMargins (const Insets &m)
InsetsGetMargins ()
void SetTextInsets (const Insets &t)
InsetsGetTextInsets ()
List< ActiveWindow > & GetChildren ()
void SetCellInsets (const Insets &c)
InsetsGetCellInsets ()
void SetCells (int cx, int cy, int cw=1, int ch=1)
void SetCells (const Rect &r)
RectGetCells ()
void SetFixedWidth (int w)
int GetFixedWidth () const
void SetFixedHeight (int h)
int GetFixedHeight () const
void SetAlpha (double a)
double GetAlpha () const
void SetBackColor (Color c)
Color GetBackColor () const
void SetBaseColor (Color c)
Color GetBaseColor () const
void SetForeColor (Color c)
Color GetForeColor () const
void SetSingleLine (bool a)
bool GetSingleLine () const
void SetTextAlign (DWORD a)
DWORD GetTextAlign () const
void SetTransparent (bool t)
bool GetTransparent () const
void SetHidePartial (bool a)
bool GetHidePartial () const
void SetTabStop (int n, int x)
int GetTabStop (int n) const
void DrawText (const char *txt, int count, Rect &txt_rect, DWORD flags)
virtual void RegisterClient (int EID, ActiveWindow *client, PFVAWE callback)
virtual void UnregisterClient (int EID, ActiveWindow *client)
virtual void ClientEvent (int EID, int x=0, int y=0)
virtual ActiveWindowGetForm ()
virtual void SetForm (ActiveWindow *f)
virtual bool IsFormActive () const
virtual bool IsTopMost () const
virtual void SetTopMost (bool t)
virtual ActiveWindowFindChild (DWORD id)
virtual ActiveWindowFindChild (int x, int y)
- Public Member Functions inherited from Window
 Window (Screen *s, int ax, int ay, int aw, int ah)
virtual ~Window ()
int operator== (const Window &that) const
ScreenGetScreen () const
const RectGetRect () const
int X () const
int Y () const
int Width () const
int Height () const
virtual bool IsShown () const
virtual bool AddView (View *v)
virtual bool DelView (View *v)
Rect ClipRect (const Rect &r)
bool ClipLine (int &x1, int &y1, int &x2, int &y2)
bool ClipLine (double &x1, double &y1, double &x2, double &y2)
void DrawLine (int x1, int y1, int x2, int y2, Color color, int blend=0)
void DrawRect (int x1, int y1, int x2, int y2, Color color, int blend=0)
void DrawRect (const Rect &r, Color color, int blend=0)
void FillRect (int x1, int y1, int x2, int y2, Color color, int blend=0)
void FillRect (const Rect &r, Color color, int alpha=0)
void DrawBitmap (int x1, int y1, int x2, int y2, Bitmap *img, int blend=0)
void FadeBitmap (int x1, int y1, int x2, int y2, Bitmap *img, Color c, int blend)
void ClipBitmap (int x1, int y1, int x2, int y2, Bitmap *img, Color c, int blend, const Rect &clip)
void TileBitmap (int x1, int y1, int x2, int y2, Bitmap *img, int blend=0)
void DrawLines (int nPts, POINT *pts, Color color, int blend=0)
void DrawPoly (int nPts, POINT *pts, Color color, int blend=0)
void FillPoly (int nPts, POINT *pts, Color color, int blend=0)
void DrawEllipse (int x1, int y1, int x2, int y2, Color color, int blend=0)
void FillEllipse (int x1, int y1, int x2, int y2, Color color, int blend=0)
void SetFont (Font *f)
FontGetFont () const
void Print (int x1, int y1, const char *fmt,...)
- Public Member Functions inherited from EventTarget
virtual ~EventTarget ()
int operator== (const EventTarget &t) const

Static Public Member Functions

static const char * TYPENAME ()

Protected Member Functions

virtual void DrawTabbedText ()
virtual void DrawRichText (Rect &text_rect)
int GetNextTab (int xpos)
virtual int find_next_word_start (const char *text, int index)
virtual int find_next_word_end (const char *text, int index)
virtual int parse_hex_digit (char c)
virtual int process_tag (const char *text, int index, Font *&font)

Additional Inherited Members

- Public Types inherited from ScrollWindow
enum  POLICY { SCROLL_NEVER, SCROLL_AUTO, SCROLL_ALWAYS }
enum  SCROLL {
  SCROLL_NONE, SCROLL_UP, SCROLL_PAGE_UP, SCROLL_DOWN,
  SCROLL_PAGE_DOWN, SCROLL_THUMB
}
enum  MISC {
  BORDER_WIDTH = 2, EXTRA_WIDTH = 4, SCROLL_WIDTH = 16, SCROLL_HEIGHT = 6,
  SCROLL_TRACK = SCROLL_WIDTH + 1, TRACK_START = BORDER_WIDTH + SCROLL_HEIGHT, THUMB_HEIGHT = SCROLL_WIDTH, HEADING_EXTRA = BORDER_WIDTH + EXTRA_WIDTH
}
- Protected Attributes inherited from ScrollWindow
int captured
int dragging
int selecting
int scrolling
int scroll_count
int mouse_x
int mouse_y
int track_length
int thumb_pos
int leading
int scroll_bar
int dragdrop
int line_count
int page_count
int page_size
int top_index
int line_height
bool smooth_scroll
double smooth_offset
- Protected Attributes inherited from ActiveWindow
DWORD id
DWORD style
DWORD text_align
bool single_line
bool focus
bool enabled
bool hide_partial
float alpha
Color back_color
Color base_color
Color fore_color
Text text
Text alt_text
Text desc
Bitmaptexture
Insets margins
Insets text_insets
Insets cell_insets
Rect cells
int fixed_width
int fixed_height
int tab [10]
ActiveWindowparent
ActiveWindowform
bool transparent
bool topmost
Layoutlayout
List< ActiveWindowchildren
List< AWMapclients
AWEvent event
int rows
int cols
Polypolys
VertexSetvset
Materialmtl
- Protected Attributes inherited from Window
Rect rect
Screenscreen
bool shown
Fontfont
List< Viewview_list

Detailed Description

Definition at line 28 of file RichTextBox.h.


Constructor & Destructor Documentation

RichTextBox::RichTextBox ( ActiveWindow p,
int  ax,
int  ay,
int  aw,
int  ah,
DWORD  aid = 0,
DWORD  astyle = 0 
)

Definition at line 28 of file RichTextBox.cpp.

RichTextBox::RichTextBox ( Screen s,
int  ax,
int  ay,
int  aw,
int  ah,
DWORD  aid = 0,
DWORD  astyle = 0 
)

Definition at line 38 of file RichTextBox.cpp.

RichTextBox::~RichTextBox ( )
virtual

Definition at line 48 of file RichTextBox.cpp.


Member Function Documentation

void RichTextBox::DrawContent ( const Rect ctrl_rect)
virtual

Reimplemented from ScrollWindow.

Definition at line 64 of file RichTextBox.cpp.

void RichTextBox::DrawRichText ( Rect text_rect)
protectedvirtual

Definition at line 210 of file RichTextBox.cpp.

void RichTextBox::DrawTabbedText ( )
protectedvirtual

Reimplemented from ActiveWindow.

Definition at line 72 of file RichTextBox.cpp.

int RichTextBox::find_next_word_end ( const char *  text,
int  index 
)
protectedvirtual

Definition at line 112 of file RichTextBox.cpp.

int RichTextBox::find_next_word_start ( const char *  text,
int  index 
)
protectedvirtual

Definition at line 100 of file RichTextBox.cpp.

int RichTextBox::GetNextTab ( int  xpos)
protected

Definition at line 199 of file RichTextBox.cpp.

int RichTextBox::OnClick ( )
virtual

Reimplemented from ScrollWindow.

Definition at line 435 of file RichTextBox.cpp.

int RichTextBox::OnKeyDown ( int  vk,
int  flags 
)
virtual

Reimplemented from ScrollWindow.

Definition at line 450 of file RichTextBox.cpp.

int RichTextBox::OnLButtonDown ( int  x,
int  y 
)
virtual

Reimplemented from ScrollWindow.

Definition at line 414 of file RichTextBox.cpp.

int RichTextBox::OnLButtonUp ( int  x,
int  y 
)
virtual

Reimplemented from ScrollWindow.

Definition at line 421 of file RichTextBox.cpp.

int RichTextBox::OnMouseMove ( int  x,
int  y 
)
virtual

Reimplemented from ScrollWindow.

Definition at line 390 of file RichTextBox.cpp.

int RichTextBox::OnMouseWheel ( int  wheel)
virtual

Reimplemented from ScrollWindow.

Definition at line 428 of file RichTextBox.cpp.

int RichTextBox::operator== ( const RichTextBox w) const
inline

Definition at line 37 of file RichTextBox.h.

int RichTextBox::parse_hex_digit ( char  c)
protectedvirtual

Definition at line 138 of file RichTextBox.cpp.

int RichTextBox::process_tag ( const char *  text,
int  index,
Font *&  font 
)
protectedvirtual

Definition at line 149 of file RichTextBox.cpp.

void RichTextBox::SetText ( const char *  t)
virtual

Reimplemented from ActiveWindow.

Definition at line 55 of file RichTextBox.cpp.

static const char* RichTextBox::TYPENAME ( )
inlinestatic

Reimplemented from ActiveWindow.

Definition at line 31 of file RichTextBox.h.


The documentation for this class was generated from the following files: