Starshatter_Open
Open source Starshatter engine
|
#include <ScrollWindow.h>
Public Types | |
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 } |
Public Member Functions | |
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 | DrawContent (const Rect &ctrl_rect) |
virtual void | DrawTransparentContent (const Rect &ctrl_rect) |
virtual void | DrawScrollBar () |
virtual void | MoveTo (const Rect &r) |
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) |
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 ActiveWindow * | FindControl (int x, int y) |
virtual Rect | TargetRect () const |
virtual ActiveWindow * | GetCapture () |
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 char *t) |
void | SetText (const Text &t) |
void | AddText (const char *t) |
void | AddText (const Text &t) |
const Text & | GetText () const |
void | SetAltText (const char *t) |
void | SetAltText (const Text &t) |
const Text & | GetAltText () const |
void | SetTexture (Bitmap *bmp) |
Bitmap * | GetTexture () |
void | SetMargins (const Insets &m) |
Insets & | GetMargins () |
void | SetTextInsets (const Insets &t) |
Insets & | GetTextInsets () |
List< ActiveWindow > & | GetChildren () |
void | SetCellInsets (const Insets &c) |
Insets & | GetCellInsets () |
void | SetCells (int cx, int cy, int cw=1, int ch=1) |
void | SetCells (const Rect &r) |
Rect & | GetCells () |
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 ActiveWindow * | GetForm () |
virtual void | SetForm (ActiveWindow *f) |
virtual bool | IsFormActive () const |
virtual bool | IsTopMost () const |
virtual void | SetTopMost (bool t) |
virtual ActiveWindow * | FindChild (DWORD id) |
virtual ActiveWindow * | FindChild (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 |
Screen * | GetScreen () const |
const Rect & | GetRect () 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) |
Font * | GetFont () const |
void | Print (int x1, int y1, const char *fmt,...) |
Public Member Functions inherited from EventTarget | |
virtual | ~EventTarget () |
int | operator== (const EventTarget &t) const |
Additional Inherited Members | |
Static Public Member Functions inherited from ActiveWindow | |
static const char * | TYPENAME () |
static void | SetSystemFont (Font *f) |
static void | SetSystemBackColor (Color c) |
static void | SetSystemForeColor (Color c) |
Protected Member Functions inherited from ActiveWindow | |
virtual Color | ShadeColor (Color c, double shade) |
virtual void | AddChild (ActiveWindow *child) |
virtual void | DrawStyleRect (const Rect &r, int style) |
virtual void | DrawStyleRect (int x1, int y1, int x2, int y2, int style) |
virtual void | DrawTabbedText () |
virtual void | DrawTextureGrid () |
virtual void | CalcGrid () |
Protected Member Functions inherited from Window | |
virtual void | ScreenToWindow (int &x, int &y) |
virtual void | ScreenToWindow (Rect &r) |
Static Protected Attributes inherited from ActiveWindow | |
static Font * | sys_font = 0 |
static Color | sys_back_color = Color(128,128,128) |
static Color | sys_fore_color = Color( 0, 0, 0) |
Definition at line 24 of file ScrollWindow.h.
enum ScrollWindow::MISC |
BORDER_WIDTH | |
EXTRA_WIDTH | |
SCROLL_WIDTH | |
SCROLL_HEIGHT | |
SCROLL_TRACK | |
TRACK_START | |
THUMB_HEIGHT | |
HEADING_EXTRA |
Definition at line 40 of file ScrollWindow.h.
enum ScrollWindow::POLICY |
Definition at line 27 of file ScrollWindow.h.
enum ScrollWindow::SCROLL |
Definition at line 32 of file ScrollWindow.h.
ScrollWindow::ScrollWindow | ( | ActiveWindow * | p, |
int | ax, | ||
int | ay, | ||
int | aw, | ||
int | ah, | ||
DWORD | aid, | ||
DWORD | style = 0 , |
||
ActiveWindow * | parent = 0 |
||
) |
Definition at line 34 of file ScrollWindow.cpp.
ScrollWindow::ScrollWindow | ( | Screen * | s, |
int | ax, | ||
int | ay, | ||
int | aw, | ||
int | ah, | ||
DWORD | aid, | ||
DWORD | style = 0 , |
||
ActiveWindow * | parent = 0 |
||
) |
Definition at line 65 of file ScrollWindow.cpp.
|
virtual |
Definition at line 96 of file ScrollWindow.cpp.
|
virtual |
Reimplemented in EditBox.
Definition at line 307 of file ScrollWindow.cpp.
|
virtual |
Reimplemented from ActiveWindow.
Reimplemented in ComboList.
Definition at line 127 of file ScrollWindow.cpp.
|
virtual |
Reimplemented in ListBox, RichTextBox, and EditBox.
Definition at line 185 of file ScrollWindow.cpp.
|
virtual |
Definition at line 198 of file ScrollWindow.cpp.
|
virtual |
Definition at line 157 of file ScrollWindow.cpp.
|
virtual |
Definition at line 191 of file ScrollWindow.cpp.
|
virtual |
Definition at line 312 of file ScrollWindow.cpp.
|
virtual |
Definition at line 270 of file ScrollWindow.cpp.
|
virtual |
Definition at line 258 of file ScrollWindow.cpp.
|
virtual |
Reimplemented in ListBox.
Definition at line 410 of file ScrollWindow.cpp.
|
virtual |
Definition at line 247 of file ScrollWindow.cpp.
|
virtual |
Reimplemented in EditBox.
Definition at line 395 of file ScrollWindow.cpp.
|
virtual |
Reimplemented in EditBox.
Definition at line 400 of file ScrollWindow.cpp.
|
virtual |
Definition at line 282 of file ScrollWindow.cpp.
|
virtual |
Definition at line 405 of file ScrollWindow.cpp.
|
virtual |
Definition at line 294 of file ScrollWindow.cpp.
|
virtual |
Definition at line 390 of file ScrollWindow.cpp.
|
inline |
Definition at line 103 of file ScrollWindow.h.
|
inline |
Definition at line 105 of file ScrollWindow.h.
|
virtual |
Definition at line 234 of file ScrollWindow.cpp.
|
inline |
Definition at line 104 of file ScrollWindow.h.
|
virtual |
Reimplemented from ActiveWindow.
Definition at line 102 of file ScrollWindow.cpp.
|
virtual |
Reimplemented from ActiveWindow.
Reimplemented in ListBox, ComboList, EditBox, and RichTextBox.
Definition at line 569 of file ScrollWindow.cpp.
|
virtual |
Reimplemented from ActiveWindow.
Reimplemented in ListBox.
Definition at line 629 of file ScrollWindow.cpp.
|
virtual |
Reimplemented from ActiveWindow.
Reimplemented in ListBox.
Definition at line 621 of file ScrollWindow.cpp.
|
virtual |
Reimplemented from ActiveWindow.
Reimplemented in ListBox, EditBox, and RichTextBox.
Definition at line 586 of file ScrollWindow.cpp.
|
virtual |
Reimplemented from ActiveWindow.
Reimplemented in ListBox, ComboList, EditBox, and RichTextBox.
Definition at line 456 of file ScrollWindow.cpp.
|
virtual |
Reimplemented from ActiveWindow.
Reimplemented in ListBox, ComboList, EditBox, and RichTextBox.
Definition at line 514 of file ScrollWindow.cpp.
|
virtual |
Reimplemented from ActiveWindow.
Reimplemented in ListBox, ComboList, EditBox, and RichTextBox.
Definition at line 417 of file ScrollWindow.cpp.
|
virtual |
Reimplemented from ActiveWindow.
Reimplemented in ListBox, and RichTextBox.
Definition at line 547 of file ScrollWindow.cpp.
|
virtual |
Reimplemented from ActiveWindow.
Definition at line 113 of file ScrollWindow.cpp.
|
virtual |
Reimplemented in EditBox.
Definition at line 321 of file ScrollWindow.cpp.
|
virtual |
Reimplemented in EditBox.
Definition at line 380 of file ScrollWindow.cpp.
|
virtual |
Definition at line 275 of file ScrollWindow.cpp.
|
virtual |
Definition at line 263 of file ScrollWindow.cpp.
|
virtual |
Definition at line 252 of file ScrollWindow.cpp.
|
virtual |
Definition at line 287 of file ScrollWindow.cpp.
|
virtual |
Definition at line 299 of file ScrollWindow.cpp.
|
virtual |
Definition at line 354 of file ScrollWindow.cpp.
|
protected |
Reimplemented in ComboList.
Definition at line 108 of file ScrollWindow.h.
|
protected |
Definition at line 120 of file ScrollWindow.h.
|
protected |
Definition at line 109 of file ScrollWindow.h.
|
protected |
Definition at line 118 of file ScrollWindow.h.
|
protected |
Definition at line 121 of file ScrollWindow.h.
|
protected |
Definition at line 125 of file ScrollWindow.h.
|
protected |
Definition at line 113 of file ScrollWindow.h.
|
protected |
Definition at line 114 of file ScrollWindow.h.
|
protected |
Definition at line 122 of file ScrollWindow.h.
|
protected |
Definition at line 123 of file ScrollWindow.h.
|
protected |
Definition at line 119 of file ScrollWindow.h.
|
protected |
Definition at line 112 of file ScrollWindow.h.
|
protected |
Reimplemented in ComboList.
Definition at line 111 of file ScrollWindow.h.
|
protected |
Definition at line 110 of file ScrollWindow.h.
|
protected |
Definition at line 128 of file ScrollWindow.h.
|
protected |
Definition at line 127 of file ScrollWindow.h.
|
protected |
Definition at line 116 of file ScrollWindow.h.
|
protected |
Definition at line 124 of file ScrollWindow.h.
|
protected |
Definition at line 115 of file ScrollWindow.h.