In file include/csws/csspinbx.h:

class csSpinBox : public csInputLine

The spinbox class is a combination of an input line and a bi-directional arrow button which can be used to switch input line contents back and forth between a set of predefined values

Inheritance:


Public Methods

csSpinBox(csComponent *iParent, csInputLineFrameStyle iFrameStyle = csifsThickRect)
Create spin box object
virtual void Draw()
Draw the spin box
virtual bool HandleEvent(csEvent &Event)
Handle external events
int InsertItem(char *iValue, int iPosition)
Insert a item into spinbox (same as csSpinBoxInsertItem message)
void SetLimits(int iMin, int iMax, char *iFormat = "%d")
Set spin box type to numerical and set spin limits
void SetValue(int iValue)
Set spin box content
~csSpinBox()
Destructor

Private Fields

cscmdSpinBoxInsertItem
Insert a string into list of spin box's values
IN: (csSpinBoxItem *)Item
OUT: (int)Ordinal
cscmdSpinBoxQueryValue
Query value of spin box
OUT: (int)Value
cscmdSpinBoxSetValue
Set spin box value
IN: (int)Value
cscmdSpinBoxSetLimits int Value
Set spinbox type to numerical and set its limits
IN: (csSpinBoxLimits *)Limits

Inherited from csInputLine:

Public Methods

void DeleteSelection()
virtual bool IsValidChar(char iChar)
virtual bool IsValidPos(int NewPos)
virtual bool IsValidString(char *iText)
void SetCursorPos(int NewPos, bool ExtendSel)
void SetSelection(int iStart, int iEnd)
virtual void SetState(int mask, bool enable)
virtual void SetText(char *iText)

Protected Methods

int GetCharX(int iNum)

Private Fields

int cursorpos
csRect cursorrect
bool cursorvis
int firstchar
csInputLineFrameStyle FrameStyle
bool insert
int maxlen
int selstart
int textx

Inherited from csComponent:

Public Fields

csApp* app
csRect bound
csVector clipchildren
csComponent* focused
unsigned int id
csComponent* next
csComponent* parent
csComponent* top

Public Methods

void Box(int xmin, int ymin, int xmax, int ymax, int colindx)
void Center(bool iHoriz = true, bool iVert = true)
virtual void Close()
virtual void Delete(csComponent *comp)
void DeleteAll()
void DeleteClipChild(csComponent *clipchild)
void Drag(int x, int y, int DragMode)
void FindMaxFreeRect(csRect &area)
virtual void FixPosition(int &newX, int &newY)
virtual void FixSize(int &newW, int &newH)
csComponent* ForEach(bool (*func) (csComponent *child, void *param), void *param = NULL, bool Zorder = false)
csComponent* GetChild(int find_id)
csComponent* GetClipParent()
int GetColor(int Index)
csComponent* GetDefault()
int GetDragStyle()
csComponent* GetFocused()
int GetFont()
int GetState(int mask)
virtual char* GetText()
virtual void GetText(char *oText, int iTextSize)
csComponent* GetTop()
void GlobalToLocal(int &x, int &y)
bool HandleDragEvent(csEvent &Event, int BorderW, int BorderH)
virtual void Hide()
virtual void Insert(csComponent *comp)
void InsertClipChild(csComponent *clipchild)
void Invalidate(bool IncludeChildren = false)
void Invalidate(int xmin, int ymin, int xmax, int ymax, bool IncludeChildren = false)
void Invalidate(csRect &area, bool IncludeChildren = false)
void Line(float x1, float y1, float x2, float y2, int colindx)
void LocalToGlobal(int &x, int &y)
virtual bool Maximize()
virtual csComponent* NextChild(csComponent *start = NULL, bool disabled = false)
virtual csComponent* NextControl(csComponent *start = NULL)
virtual csComponent* NextGroup(csComponent *start = NULL)
void ObliqueRect3D(int xmin, int ymin, int xmax, int ymax, int cornersize, int darkindx, int lightindx)
void Pixel(int x, int y, int colindx)
virtual bool PostHandleEvent(csEvent &Event)
virtual bool PreHandleEvent(csEvent &Event)
virtual csComponent* PrevChild(csComponent *start = NULL, bool disabled = false)
virtual csComponent* PrevControl(csComponent *start = NULL)
virtual csComponent* PrevGroup(csComponent *start = NULL)
void Rect3D(int xmin, int ymin, int xmax, int ymax, int darkindx, int lightindx)
void Redraw()
virtual bool Restore()
bool Select()
void* SendCommand(int CommandCode, void *Info = NULL)
void SetApp(csApp *newapp)
void SetClipRect(int xmin, int ymin, int xmax, int ymax)
void SetClipRect()
void SetColor(int Index, int Color)
bool SetDragRect(int xmin, int ymin, int xmax, int ymax)
void SetDragStyle(int iDragStyle)
bool SetFocused(csComponent *comp)
void SetFont(int iFont, bool IncludeChildren = false)
void SetMouse(csMouseCursorID Cursor)
void SetPalette(int *iPalette, int iPaletteSize)
void SetPalette(int iPaletteID)
void SetPos(int x, int y)
virtual bool SetRect(int xmin, int ymin, int xmax, int ymax)
bool SetRect(csRect &rect)
void SetSize(int w, int h)
void SetSizingCursor(int dragtype)
virtual void SetSuggestedSize(int dw, int dh)
bool SetZorder(csComponent *comp, csComponent *below)
virtual void Show(bool focused = false)
void Sprite2D(csSprite2D *s2d, int x, int y)
void Sprite2D(csSprite2D *s2d, int x, int y, int w, int h)
virtual void SuggestSize(int &w, int &h)
void Text(int x, int y, int fgindx, int bgindx, char *s)
int TextHeight()
int TextWidth(char *text)

Public

Protected Fields

csRect clip
csComponent* clipparent
csRect dirty
static csRect dragBound
int DragStyle
static int dragX
int Font
bool Maximized
csRect OrgBound
bool originalpalette
int* palette
int state
char* text

Protected Methods

void Clip(csObjVector &rect, csComponent *last)
void ClipAlienChildren(csObjVector &rect, csComponent *child)
void DrawUnderline(int iX, int iY, char *iText, int iUnderlinePos, int iColor)
static void PrepareLabel(char *iLabel, char * &oLabel, int &oUnderlinePos)
static int WordLeft(char *iText, int StartPos)
static int WordRight(char *iText, int StartPos)

Inherited from csBase:


Documentation

The spinbox class is a combination of an input line and a bi-directional arrow button which can be used to switch input line contents back and forth between a set of predefined values
cscmdSpinBoxQueryValue
Query value of spin box
OUT: (int)Value

cscmdSpinBoxSetValue
Set spin box value
IN: (int)Value

cscmdSpinBoxInsertItem
Insert a string into list of spin box's values
IN: (csSpinBoxItem *)Item
OUT: (int)Ordinal

cscmdSpinBoxSetLimits int Value
Set spinbox type to numerical and set its limits
IN: (csSpinBoxLimits *)Limits

csSpinBox(csComponent *iParent, csInputLineFrameStyle iFrameStyle = csifsThickRect)
Create spin box object

~csSpinBox()
Destructor

virtual void Draw()
Draw the spin box

virtual bool HandleEvent(csEvent &Event)
Handle external events

void SetLimits(int iMin, int iMax, char *iFormat = "%d")
Set spin box type to numerical and set spin limits

void SetValue(int iValue)
Set spin box content.

If spin box type is numerical, the iValue parameter is the number that will be set in entry field (after it will be clipped to Min..Max), if spin box type is enumerated, iValue is the ordinal of value to be set.

int InsertItem(char *iValue, int iPosition)
Insert a item into spinbox (same as csSpinBoxInsertItem message)


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de