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

#include <ComboList.h>

Inheritance diagram for ComboList:
ScrollWindow ActiveWindow Window EventTarget

List of all members.

Public Member Functions

 ComboList (ComboBox *ctrl, ActiveWindow *p, int ax, int ay, int aw, int ah, int maxentries)
 ComboList (ComboBox *ctrl, Screen *s, int ax, int ay, int aw, int ah, int maxentries)
virtual ~ComboList ()
virtual void Draw ()
virtual void Show ()
virtual void Hide ()
virtual int OnMouseMove (int x, int y)
virtual int OnLButtonDown (int x, int y)
virtual int OnLButtonUp (int x, int y)
virtual int OnClick ()
virtual int OnMouseEnter (int x, int y)
virtual int OnMouseExit (int x, int y)
virtual void KillFocus ()
virtual void ClearItems ()
virtual void AddItem (const char *item)
virtual void AddItems (ListIter< Text > item_list)
virtual void SetItems (ListIter< Text > item_list)
virtual const char * GetItem (int index)
virtual void SetItem (int index, const char *item)
virtual int GetCount ()
virtual const char * GetSelectedItem ()
virtual int GetSelectedIndex ()
virtual void SetSelection (int index)
- 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 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 OnMouseWheel (int wheel)
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 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 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 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 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

void DrawRectSimple (Rect &rect, int stat)
void DrawItem (Text label, Rect &btn_rect, int state)
Rect CalcLabelRect (const Rect &btn_rect)
int CalcSeln (int x, int y)
void CopyStyle (const ComboBox &ctrl)

Protected Attributes

ComboBoxcombo_box
List< Textitems
bool animated
bool border
int seln
int captured
int bevel_width
int button_state
int button_height
int max_entries
int scroll
int scrolling
Color active_color
Color border_color
- Protected Attributes inherited from ScrollWindow
int dragging
int selecting
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

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
}

Detailed Description

Definition at line 31 of file ComboList.h.


Constructor & Destructor Documentation

ComboList::ComboList ( ComboBox ctrl,
ActiveWindow p,
int  ax,
int  ay,
int  aw,
int  ah,
int  maxentries 
)

Definition at line 26 of file ComboList.cpp.

ComboList::ComboList ( ComboBox ctrl,
Screen s,
int  ax,
int  ay,
int  aw,
int  ah,
int  maxentries 
)

Definition at line 57 of file ComboList.cpp.

ComboList::~ComboList ( )
virtual

Definition at line 92 of file ComboList.cpp.


Member Function Documentation

void ComboList::AddItem ( const char *  item)
virtual

Definition at line 348 of file ComboList.cpp.

void ComboList::AddItems ( ListIter< Text item_list)
virtual

Definition at line 353 of file ComboList.cpp.

Rect ComboList::CalcLabelRect ( const Rect btn_rect)
protected

Definition at line 245 of file ComboList.cpp.

int ComboList::CalcSeln ( int  x,
int  y 
)
protected

Definition at line 254 of file ComboList.cpp.

void ComboList::ClearItems ( )
virtual

Definition at line 341 of file ComboList.cpp.

void ComboList::CopyStyle ( const ComboBox ctrl)
protected

Definition at line 100 of file ComboList.cpp.

void ComboList::Draw ( )
virtual

Reimplemented from ScrollWindow.

Definition at line 136 of file ComboList.cpp.

void ComboList::DrawItem ( Text  label,
Rect btn_rect,
int  state 
)
protected

Definition at line 206 of file ComboList.cpp.

void ComboList::DrawRectSimple ( Rect rect,
int  stat 
)
protected

Definition at line 197 of file ComboList.cpp.

int ComboList::GetCount ( )
virtual

Definition at line 408 of file ComboList.cpp.

const char * ComboList::GetItem ( int  index)
virtual

Definition at line 392 of file ComboList.cpp.

int ComboList::GetSelectedIndex ( )
virtual

Definition at line 421 of file ComboList.cpp.

const char * ComboList::GetSelectedItem ( )
virtual

Definition at line 413 of file ComboList.cpp.

void ComboList::Hide ( )
virtual

Reimplemented from ActiveWindow.

Definition at line 126 of file ComboList.cpp.

void ComboList::KillFocus ( )
virtual

Reimplemented from ActiveWindow.

Definition at line 333 of file ComboList.cpp.

int ComboList::OnClick ( )
virtual

Reimplemented from ScrollWindow.

Definition at line 312 of file ComboList.cpp.

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

Reimplemented from ScrollWindow.

Definition at line 289 of file ComboList.cpp.

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

Reimplemented from ScrollWindow.

Definition at line 300 of file ComboList.cpp.

int ComboList::OnMouseEnter ( int  x,
int  y 
)
virtual

Reimplemented from ActiveWindow.

Definition at line 317 of file ComboList.cpp.

int ComboList::OnMouseExit ( int  x,
int  y 
)
virtual

Reimplemented from ActiveWindow.

Definition at line 325 of file ComboList.cpp.

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

Reimplemented from ScrollWindow.

Definition at line 266 of file ComboList.cpp.

void ComboList::SetItem ( int  index,
const char *  item 
)
virtual

Definition at line 400 of file ComboList.cpp.

void ComboList::SetItems ( ListIter< Text item_list)
virtual

Definition at line 359 of file ComboList.cpp.

void ComboList::SetSelection ( int  index)
virtual

Definition at line 429 of file ComboList.cpp.

void ComboList::Show ( )
virtual

Reimplemented from ActiveWindow.

Definition at line 115 of file ComboList.cpp.

static const char* ComboList::TYPENAME ( )
inlinestatic

Reimplemented from ActiveWindow.

Definition at line 34 of file ComboList.h.


Member Data Documentation

Color ComboList::active_color
protected

Definition at line 87 of file ComboList.h.

bool ComboList::animated
protected

Definition at line 76 of file ComboList.h.

int ComboList::bevel_width
protected

Definition at line 80 of file ComboList.h.

bool ComboList::border
protected

Definition at line 77 of file ComboList.h.

Color ComboList::border_color
protected

Definition at line 88 of file ComboList.h.

int ComboList::button_height
protected

Definition at line 82 of file ComboList.h.

int ComboList::button_state
protected

Definition at line 81 of file ComboList.h.

int ComboList::captured
protected

Reimplemented from ScrollWindow.

Definition at line 79 of file ComboList.h.

ComboBox* ComboList::combo_box
protected

Definition at line 74 of file ComboList.h.

List<Text> ComboList::items
protected

Definition at line 75 of file ComboList.h.

int ComboList::max_entries
protected

Definition at line 83 of file ComboList.h.

int ComboList::scroll
protected

Definition at line 84 of file ComboList.h.

int ComboList::scrolling
protected

Reimplemented from ScrollWindow.

Definition at line 85 of file ComboList.h.

int ComboList::seln
protected

Definition at line 78 of file ComboList.h.


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