CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Button
[Components]


Compounds

class  csButton
 The Button class implements different types of push buttons. More...


Button style flags

#define CSBS_SHIFT   0x00000001
 does bitmap and/or text shift when button is pressed?

#define CSBS_DEFAULT   0x00000002
 Is this the default button?

#define CSBS_NODEFAULTBORDER   0x00000004
 Never draw a "default button" border.

#define CSBS_SELECTABLE   0x00000008
 Is this button selectable?

#define CSBS_NOMOUSEFOCUS   0x00000010
 Do not focus button when clicked by mouse.

#define CSBS_NOKEYBOARDFOCUS   0x00000020
 Do not focus button when activated with keyboard.

#define CSBS_MULTICHOOSE   0x00000040
 Button is a multi-choose button.

#define CSBS_DISMISS   0x00000080
 Dismiss parent dialog when this button is pressed.

#define CSBS_TEXTPLACEMENT   0x00030000
 Text placement relative to bitmap: value mask.

#define CSBS_TEXTABOVE   0x00000000
 Draw text above bitmap.

#define CSBS_TEXTBELOW   0x00010000
 Draw text below the bitmap.

#define CSBS_TEXTONTOP   0x00020000
 Draw text on top of the bitmap (bitmap as background).

#define CSBS_DEFAULTVALUE   (CSBS_SHIFT | CSBS_SELECTABLE | CSBS_TEXTBELOW)
 Default button styles.


Enumerations

enum  { cscmdButtonDown = 0x00000500, cscmdButtonUp, cscmdButtonRightClick, cscmdButtonDeselect }
 Button messages. More...

enum  csButtonFrameStyle {
  csbfsNone, csbfsOblique, csbfsThickRect, csbfsThinRect,
  csbfsVeryThinRect, csbfsTextured, csbfsBitmap
}
 Possible button frame styles. More...


Define Documentation

#define CSBS_DEFAULT   0x00000002
 

Is this the default button?

Definition at line 42 of file csbutton.h.

#define CSBS_DEFAULTVALUE   (CSBS_SHIFT | CSBS_SELECTABLE | CSBS_TEXTBELOW)
 

Default button styles.

Definition at line 70 of file csbutton.h.

#define CSBS_DISMISS   0x00000080
 

Dismiss parent dialog when this button is pressed.

Definition at line 59 of file csbutton.h.

#define CSBS_MULTICHOOSE   0x00000040
 

Button is a multi-choose button.

A multi-choose button sends a cscmdButtonDeselect to all its neightbours until a group bound is encountered. This is used for panels of buttons of which only one can be selected (and pressed) at one time.

Definition at line 57 of file csbutton.h.

#define CSBS_NODEFAULTBORDER   0x00000004
 

Never draw a "default button" border.

Definition at line 44 of file csbutton.h.

#define CSBS_NOKEYBOARDFOCUS   0x00000020
 

Do not focus button when activated with keyboard.

Definition at line 50 of file csbutton.h.

#define CSBS_NOMOUSEFOCUS   0x00000010
 

Do not focus button when clicked by mouse.

Definition at line 48 of file csbutton.h.

#define CSBS_SELECTABLE   0x00000008
 

Is this button selectable?

Definition at line 46 of file csbutton.h.

#define CSBS_SHIFT   0x00000001
 

does bitmap and/or text shift when button is pressed?

Definition at line 40 of file csbutton.h.

#define CSBS_TEXTABOVE   0x00000000
 

Draw text above bitmap.

Definition at line 63 of file csbutton.h.

#define CSBS_TEXTBELOW   0x00010000
 

Draw text below the bitmap.

Definition at line 65 of file csbutton.h.

#define CSBS_TEXTONTOP   0x00020000
 

Draw text on top of the bitmap (bitmap as background).

Definition at line 67 of file csbutton.h.

#define CSBS_TEXTPLACEMENT   0x00030000
 

Text placement relative to bitmap: value mask.

Definition at line 61 of file csbutton.h.


Enumeration Type Documentation

anonymous enum
 

Button messages.

Enumeration values:
cscmdButtonDown  Button down notification.

This notification is posted each time a button switches from 'normal' state into 'pressed' state.

 IN: (csButton *)source
 
cscmdButtonUp  Button up notification.

This notification is posted each time a button switches from 'pressed' state into 'normal' state.

 IN: (csButton *)source
 
cscmdButtonRightClick  Right-click button notification message.

This message is sent by a button to its parent when user clicks the button with right mouse button.

 IN: (csButton *)source
 
cscmdButtonDeselect  This message is sent by a button with CSBS_MULTICHOOSE style to its neightbours to deselect them.

Upon receiving of this message button should depress if it is pressed.

 IN: (csButton *)source
 

Definition at line 76 of file csbutton.h.

enum csButtonFrameStyle
 

Possible button frame styles.

Enumeration values:
csbfsNone  Button has no frame.
csbfsOblique  Button has a thick rectangular frame with oblique corners.
csbfsThickRect  Button has a thick rectangular frame.
csbfsThinRect  Button has a thin rectangular frame.
csbfsVeryThinRect  Button has no frame in unpressed state and a thin frame when it is pressed.
csbfsTextured  Button has a thin rectangular frame, and is textured.
csbfsBitmap  Button has no frame, and is drawn by user-set bitmaps (text and button image still appear).

Definition at line 117 of file csbutton.h.

Referenced by csButton::GetFrameStyle().


Generated for Crystal Space by doxygen 1.2.18