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

#include <Slider.h>

Inheritance diagram for Slider:
ActiveWindow Window EventTarget

List of all members.

Public Types

enum  { MAX_VAL = 8, ORIENT_HORIZONTAL = 0, ORIENT_VERTICAL = 1 }

Public Member Functions

 Slider (ActiveWindow *p, int ax, int ay, int aw, int ah, DWORD aid)
 Slider (Screen *s, int ax, int ay, int aw, int ah, DWORD aid)
virtual ~Slider ()
virtual void Draw ()
virtual int OnMouseMove (int x, int y)
virtual int OnLButtonDown (int x, int y)
virtual int OnLButtonUp (int x, int y)
virtual int OnClick ()
bool GetActive ()
void SetActive (bool bNewValue)
Color GetFillColor ()
void SetFillColor (Color c)
bool GetBorder ()
void SetBorder (bool bNewValue)
Color GetBorderColor ()
void SetBorderColor (Color c)
int GetNumLeds ()
void SetNumLeds (int nNewValue)
int GetOrientation ()
void SetOrientation (int nNewValue)
int GetRangeMin ()
void SetRangeMin (int nNewValue)
int GetRangeMax ()
void SetRangeMax (int nNewValue)
int GetStepSize ()
void SetStepSize (int nNewValue)
int GetThumbSize ()
void SetThumbSize (int nNewValue)
bool GetShowThumb ()
void SetShowThumb (bool bNewValue)
int NumValues ()
int GetValue (int index=0)
void SetValue (int nNewValue, int index=0)
double FractionalValue (int index=0)
void SetMarker (int nNewValue, int index=0)
void StepUp (int index=0)
void StepDown (int index=0)
- 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 Paint ()
virtual void Show ()
virtual void Hide ()
virtual void MoveTo (const Rect &r)
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 int OnMouseWheel (int wheel)
virtual int OnKeyDown (int vk, int flags)
virtual const char * GetDescription () const
virtual int OnDragStart (int x, int y)
virtual int OnDragDrop (int x, int y, ActiveWindow *source)
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 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 ()
- Static Public Member Functions inherited from ActiveWindow
static void SetSystemFont (Font *f)
static void SetSystemBackColor (Color c)
static void SetSystemForeColor (Color c)

Protected Attributes

int captured
int dragging
int mouse_x
int mouse_y
bool active
bool border
Color border_color
Color fill_color
int num_leds
int orientation
int range_min
int range_max
int step_size
int show_thumb
int thumb_size
int thumb_pos
int nvalues
int value [MAX_VAL]
int marker [2]
- 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

- 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 Fontsys_font = 0
static Color sys_back_color = Color(128,128,128)
static Color sys_fore_color = Color( 0, 0, 0)

Detailed Description

Definition at line 23 of file Slider.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
MAX_VAL 
ORIENT_HORIZONTAL 
ORIENT_VERTICAL 

Definition at line 28 of file Slider.h.


Constructor & Destructor Documentation

Slider::Slider ( ActiveWindow p,
int  ax,
int  ay,
int  aw,
int  ah,
DWORD  aid 
)

Definition at line 22 of file Slider.cpp.

Slider::Slider ( Screen s,
int  ax,
int  ay,
int  aw,
int  ah,
DWORD  aid 
)

Definition at line 53 of file Slider.cpp.

Slider::~Slider ( )
virtual

Definition at line 84 of file Slider.cpp.


Member Function Documentation

void Slider::Draw ( )
virtual

Reimplemented from ActiveWindow.

Definition at line 91 of file Slider.cpp.

double Slider::FractionalValue ( int  index = 0)

Definition at line 417 of file Slider.cpp.

bool Slider::GetActive ( )

Definition at line 271 of file Slider.cpp.

bool Slider::GetBorder ( )

Definition at line 281 of file Slider.cpp.

Color Slider::GetBorderColor ( )

Definition at line 291 of file Slider.cpp.

Color Slider::GetFillColor ( )

Definition at line 301 of file Slider.cpp.

int Slider::GetNumLeds ( )

Definition at line 311 of file Slider.cpp.

int Slider::GetOrientation ( )

Definition at line 323 of file Slider.cpp.

int Slider::GetRangeMax ( )

Definition at line 345 of file Slider.cpp.

int Slider::GetRangeMin ( )

Definition at line 335 of file Slider.cpp.

bool Slider::GetShowThumb ( )

Definition at line 366 of file Slider.cpp.

int Slider::GetStepSize ( )

Definition at line 355 of file Slider.cpp.

int Slider::GetThumbSize ( )

Definition at line 376 of file Slider.cpp.

int Slider::GetValue ( int  index = 0)

Definition at line 392 of file Slider.cpp.

int Slider::NumValues ( )

Definition at line 387 of file Slider.cpp.

int Slider::OnClick ( )
virtual

Reimplemented from ActiveWindow.

Definition at line 554 of file Slider.cpp.

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

Reimplemented from ActiveWindow.

Definition at line 493 of file Slider.cpp.

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

Reimplemented from ActiveWindow.

Definition at line 540 of file Slider.cpp.

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

Reimplemented from ActiveWindow.

Definition at line 449 of file Slider.cpp.

void Slider::SetActive ( bool  bNewValue)

Definition at line 276 of file Slider.cpp.

void Slider::SetBorder ( bool  bNewValue)

Definition at line 286 of file Slider.cpp.

void Slider::SetBorderColor ( Color  c)

Definition at line 296 of file Slider.cpp.

void Slider::SetFillColor ( Color  c)

Definition at line 306 of file Slider.cpp.

void Slider::SetMarker ( int  nNewValue,
int  index = 0 
)

Definition at line 410 of file Slider.cpp.

void Slider::SetNumLeds ( int  nNewValue)

Definition at line 316 of file Slider.cpp.

void Slider::SetOrientation ( int  nNewValue)

Definition at line 328 of file Slider.cpp.

void Slider::SetRangeMax ( int  nNewValue)

Definition at line 350 of file Slider.cpp.

void Slider::SetRangeMin ( int  nNewValue)

Definition at line 340 of file Slider.cpp.

void Slider::SetShowThumb ( bool  bNewValue)

Definition at line 371 of file Slider.cpp.

void Slider::SetStepSize ( int  nNewValue)

Definition at line 360 of file Slider.cpp.

void Slider::SetThumbSize ( int  nNewValue)

Definition at line 381 of file Slider.cpp.

void Slider::SetValue ( int  nNewValue,
int  index = 0 
)

Definition at line 400 of file Slider.cpp.

void Slider::StepDown ( int  index = 0)

Definition at line 437 of file Slider.cpp.

void Slider::StepUp ( int  index = 0)

Definition at line 427 of file Slider.cpp.

static const char* Slider::TYPENAME ( )
inlinestatic

Reimplemented from ActiveWindow.

Definition at line 26 of file Slider.h.


Member Data Documentation

bool Slider::active
protected

Definition at line 86 of file Slider.h.

bool Slider::border
protected

Definition at line 87 of file Slider.h.

Color Slider::border_color
protected

Definition at line 88 of file Slider.h.

int Slider::captured
protected

Definition at line 81 of file Slider.h.

int Slider::dragging
protected

Definition at line 82 of file Slider.h.

Color Slider::fill_color
protected

Definition at line 89 of file Slider.h.

int Slider::marker[2]
protected

Definition at line 103 of file Slider.h.

int Slider::mouse_x
protected

Definition at line 83 of file Slider.h.

int Slider::mouse_y
protected

Definition at line 84 of file Slider.h.

int Slider::num_leds
protected

Definition at line 91 of file Slider.h.

int Slider::nvalues
protected

Definition at line 101 of file Slider.h.

int Slider::orientation
protected

Definition at line 92 of file Slider.h.

int Slider::range_max
protected

Definition at line 95 of file Slider.h.

int Slider::range_min
protected

Definition at line 94 of file Slider.h.

int Slider::show_thumb
protected

Definition at line 97 of file Slider.h.

int Slider::step_size
protected

Definition at line 96 of file Slider.h.

int Slider::thumb_pos
protected

Definition at line 99 of file Slider.h.

int Slider::thumb_size
protected

Definition at line 98 of file Slider.h.

int Slider::value[MAX_VAL]
protected

Definition at line 102 of file Slider.h.


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