Difference between revisions of "Primitive controls"

From VCMI Project Wiki
Jump to: navigation, search
(Created page with "VCMI provides a set of controls a window can be build from. We have already written basic counterparts of most of standard controls like buttons, labels etc. Here is a list of th...")
 
 
Line 5: Line 5:
 
* '''CSlider''' - a typical slider.  
 
* '''CSlider''' - a typical slider.  
 
* '''CLabel''' - a label with custom font and color. It does nothing interesting.
 
* '''CLabel''' - a label with custom font and color. It does nothing interesting.
 +
* '''CTextBox''' - a multi-line label with optional scrolling
 
* '''CPicture''' - any bitmap.
 
* '''CPicture''' - any bitmap.
 
* '''CTextInput''' - a textbox.
 
* '''CTextInput''' - a textbox.
 
* '''CGStatusBar''' - a statusbar for general use.
 
* '''CGStatusBar''' - a statusbar for general use.
 +
* '''CListBox''' - a list view which creates several objects via passed functor and display them in list.
 +
* '''CTabbedInt''' - tabs. A set of multiple objects, behavior similar to list box.

Latest revision as of 23:22, 27 November 2011

VCMI provides a set of controls a window can be build from. We have already written basic counterparts of most of standard controls like buttons, labels etc. Here is a list of them:

  • AdventureMapButton - standard button class for general use (its name is after its first application). Optimized for buttons having standard .DEF graphics. When it's pressed, all functions from its callback field are called.
  • CHighlightableButton - basically a checkbox. Has two callbacks: one for selecting and one for deselecting. It inherits from AdventureMapButton because most of graphics handling is common/
  • CHighlightableButtonsGroup - a radio button group. It consist of many CHighlightableButtons. Functions from onChange are called when selection is changed (the parameter is the ID of selected button).
  • CSlider - a typical slider.
  • CLabel - a label with custom font and color. It does nothing interesting.
  • CTextBox - a multi-line label with optional scrolling
  • CPicture - any bitmap.
  • CTextInput - a textbox.
  • CGStatusBar - a statusbar for general use.
  • CListBox - a list view which creates several objects via passed functor and display them in list.
  • CTabbedInt - tabs. A set of multiple objects, behavior similar to list box.