Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::gui Namespace Reference


Detailed Description

contains the GUI toolkit

Base Classes and drawing

The most important base classes for GUI elements are the Displayable class and the Control interface. Both are unified in the Widget class. This is the immediate base class for TopLevel containers.
Containers may be populated with Component s. Component subclasses such as Button, TextField etc can only be displayed if they are placed in a TopLevel container. The framework provides two such containers, the plain Window and the decorated Frame. The latter may be moved, resized and closed via user input.
Top levels are automatically registered with the GuiManager and remaining containers destroyed at shutdown. All GUI elements that hold components destroy these when they themselves are destroyed. Exceptions of this rule are documented accordingly.

Look and Feel

The look and feel of GUIs may be changed by implementing the LookAndFeel and UIDelegate interfaces and installing them in the GuiManager. Individual changes may also be made through that class. Generally, Component subclasses like the Button and other classes as well as the top level containers like the Window should only be subclassed in order to add a significant amount of capabilities. All lesser modifications regarding the display and handling of the widgets should be made through the LaF.

Usage

A simple GUI may be constructed as follows:

 Frame* f=new Frame("Sample");
 f->getContent()->add(new Label("Hello World!"),&WindowLayout::TOP);
 f->getContent()->add(new Button("Press"),&WindowLayout::CENTER);
 f->setSize(f->getPreferredSize());
 f->layout();

Note that either layout or scheduleLayout must be called between changes that are made on a GUI element and the next call to draw. scheduleLayout schedules a call to layout that is executed automatically when draw is called. This has the advantage of preventing multiple (and potentially expensive) calls to layout. However, some functions will not yield the expected results until the object was actually laid out.


Classes

class  AbstractButton
 base class for button widgets More...
struct  AcceptAll
 accepts the unchanged input string More...
struct  AcceptN
 accepts only natural numbers as input. More...
class  AlignedLayout
 shows a single component More...
class  Border
 a border around GUI elements More...
class  BorderDelegate
 a UI delegate class for Border s More...
class  Bordered
 base class for GUI objects that have a border More...
class  BorderFactory
 creates Border instances More...
struct  Bounds
 the bounds of a Component More...
class  Button
 a button widget. More...
class  CheckBox
 a ToggleButton with a different LaF delegate More...
class  CommandField
 TextField especially for the use as a command input widget. More...
class  Component
 base class for all GUI components that may be used to populate Window s and other containers More...
class  Console
 a Component that allows command line style interaction with the system core More...
class  ConsoleManager
 manages one Console instance and its parent More...
class  Control
 interface for objects that permit some sort of user interaction. More...
class  DeckLayout
 stacks components on top of each other More...
class  Displayable
 The base class for all displayable GUI objects. More...
class  EventMulticaster
 Dispatches all incoming input events to the GUI components. More...
class  FocusManager
 manages the user input focus. More...
class  Frame
 A decorated Window. More...
struct  Fringe
 the space a Border takes up on each side of the bordered object More...
class  GridLayout
 arranges components in a regular grid More...
class  GuiManager
 the main gui management interface More...
class  Icon
 an icon More...
class  Label
 a label is a component that displays some text and/or an icon More...
struct  LayoutConstraint
 base for layout constraints More...
class  LayoutManager
 lays out Component s in containers More...
class  List
 a component that displays a number of strings More...
class  ListModel
 model that holds a number of string s. More...
class  ListModelDispatcher
 a ListModelEvent dispatcher More...
class  ListModelEvent
 used to notify listeners of changes in ListModel s. More...
class  ListModelListener
 a ListModelEvent listener More...
struct  ListModelRelay
class  ListSelectionDispatcher
 a ListSelectionEvent dispatcher More...
class  ListSelectionEvent
 used to notify listeners that a List 's selection has changed More...
class  ListSelectionListener
 a ListSelectionEvent listener More...
class  ListSelectionModel
 List selection model More...
struct  ListSelectionRelay
class  LookAndFeel
 interface for Look and Feel (LaF) rule sets More...
class  Panel
 A container Component. More...
class  Picture
 an image component More...
class  PlainTextModel
 TextModel implementation that handles a plain text string More...
struct  Point
 a position in pixels on the screen More...
class  RadioButton
 a button that can only be activated More...
class  RadioButtonGroup
 a group of RadioButtons More...
class  RenderStub
 handles gui rendering More...
class  Scrollable
 abstract base for Component s that may be added to a Viewport. More...
class  ScrollBar
 a Viewport control Widget More...
class  ScrollBarSlider
struct  Size
 a Component 's width and height More...
class  SliderModel
 data model for ScrollBar s and other sliders More...
class  SliderModelDispatcher
 a SliderModelEvent dispatcher More...
class  SliderModelEvent
 used to notify listeners of changes in SliderModel s. More...
class  SliderModelListener
 a SliderModelEvent listener More...
struct  SliderModelRelay
class  StackLayout
 arranges components in a row or a column More...
class  TextField
 a widget that allows users to enter a line of text More...
class  TextModel
 interface for a model that holds text More...
class  TextModelDispatcher
 a TextModelEvent dispatcher More...
class  TextModelEvent
 used to notify listeners of changes in TextModel s More...
class  TextModelListener
 a TextModelEvent listener More...
struct  TextModelRelay
class  TiltedIcon
 an Icon with flexible UV-Koordinates More...
class  TitleBar
 a Frame title bar More...
class  ToggleButton
 a button that is toggled by clicking on it More...
class  TopLevel
 Abstract base class for top level GUI objects. More...
class  UIDelegate
 delegate object that handles LaF specific operations such as drawing. More...
class  Viewport
 a portal through which larger components may be viewed More...
class  ViewportLayout
 a Viewport -typical layout More...
class  Widget
 a Displayable Control More...
class  Window
 A TopLevel container. More...
class  WindowLayout
 a Window -typical layout More...

Namespaces

namespace  laf

Typedefs

typedef SmartPointer< const
class BorderDelegate, ReferenceCounting,
DisallowConversion, SafeDereference
BrdDSP
typedef SmartPointer< const
class Border, ReferenceCounting,
DisallowConversion, SafeDereference
BrdSP
typedef util::SmartPointer<
RadioButtonGroup
ButtonGroupPtr
typedef unsigned int DelegateID
 delegate ID typedef
typedef SmartPointer< const
render::Font, ReferenceCounting,
DisallowConversion, SafeDereference
FntSP
typedef SmartPointer< const
class Icon, ReferenceCounting,
DisallowConversion, SafeDereference
IconSP
typedef SmartPointer< const
util::InputMap, ReferenceCounting,
DisallowConversion, SafeDereference
IMSP
typedef SmartPointer< class
LookAndFeel, ReferenceCounting,
DisallowConversion, SafeDereference
LaFSP
typedef util::SmartPointer<
ListModel
ListModelPtr
typedef util::SmartPointer<
SliderModel
SliderModelPtr
typedef util::SmartPointer<
TextModel
TextModelPtr
typedef SmartPointer< const
class UIDelegate, ReferenceCounting,
DisallowConversion, SafeDereference
UIDSP

Enumerations

enum  { DISABLED_FLAG = 0x8000 }
enum  ColorType {
  BACKGROUND = 1, FOREGROUND, FOCUS, SELECTION_BACKGROUND,
  SELECTION_FOREGROUND
}
 COLOR property keys used by the provided components. More...
enum  DID {
  DEFAULT_CMP = 0, WINDOW = 8, FRAME, FRAME_TITLEBAR,
  DEFAULT_BORDER = 16, EMPTY_BORDER, LINE_BORDER, LOWERED_BORDER,
  RAISED_BORDER, PANEL = 64, VIEWPORT, SCROLLBAR,
  SCROLLBAR_SLIDER, LABEL, TOGGLE_BUTTON, BUTTON,
  TEXTFIELD, LIST, CONSOLE, CHECKBOX,
  RADIOBUTTON, FIRST_USER_CMP = 1<<31
}
 holds the delegate IDs for components More...
enum  HorzAlignment { HCENTER = 0, LEFT, RIGHT }
 accepted values for the HALIGN property. More...
enum  IconID {
  UNKNOWN_ICON = 0, CLOSE_ICON = 1, ARROW_UP_ICON, ARROW_DOWN_ICON,
  ARROW_LEFT_ICON, ARROW_RIGHT_ICON, TICK_BOX_ICON, TICK_ICON
}
 place-holders for icons used by the framework More...
enum  Orientation { HORIZONTAL, VERTICAL }
 valid orientations More...
enum  Property {
  HALIGN = 1, VALIGN, COLOR, OPACITY,
  FONT, CLICK_COUNT, ROW_HEIGHT, COL_WIDTH,
  FIRST_USER_PROPERTY = 1<<31
}
 defines properties that may be modified through the GuiManager. More...
enum  StdAction {
  FIRST_STD_CMD = 0x00FFFFFF, CLOSE_ACTION, EXECUTE_ACTION, CLICK_ACTION,
  DRAG_ACTION, POPUP_ACTION, STEP_UP_ACTION, STEP_DOWN_ACTION,
  STEP_LEFT_ACTION, STEP_RIGHT_ACTION
}
enum  VertAlignment { VCENTER = 0, TOP, BOTTOM }
 accepted values for the VALIGN property. More...


Typedef Documentation

typedef SmartPointer<const class BorderDelegate,ReferenceCounting,DisallowConversion,SafeDereference> ONE::gui::BrdDSP
 

typedef SmartPointer<const class Border,ReferenceCounting,DisallowConversion,SafeDereference> ONE::gui::BrdSP
 

typedef util::SmartPointer<RadioButtonGroup> ONE::gui::ButtonGroupPtr
 

typedef unsigned int ONE::gui::DelegateID
 

delegate ID typedef

typedef SmartPointer<const render::Font,ReferenceCounting,DisallowConversion,SafeDereference> ONE::gui::FntSP
 

typedef SmartPointer<const class Icon,ReferenceCounting,DisallowConversion,SafeDereference> ONE::gui::IconSP
 

typedef SmartPointer<const util::InputMap,ReferenceCounting,DisallowConversion,SafeDereference> ONE::gui::IMSP
 

typedef SmartPointer<class LookAndFeel,ReferenceCounting,DisallowConversion,SafeDereference> ONE::gui::LaFSP
 

typedef util::SmartPointer< ListModel > ONE::gui::ListModelPtr
 

typedef util::SmartPointer<SliderModel> ONE::gui::SliderModelPtr
 

typedef util::SmartPointer<TextModel> ONE::gui::TextModelPtr
 

typedef SmartPointer<const class UIDelegate,ReferenceCounting,DisallowConversion,SafeDereference> ONE::gui::UIDSP
 


Enumeration Type Documentation

anonymous enum
 

Enumerator:
DISABLED_FLAG  combined with ColorType or IconID values to specify a version of the respective values to be used when a Widget is disabled

enum ONE::gui::ColorType
 

COLOR property keys used by the provided components.

Enumerator:
BACKGROUND 
FOREGROUND 
FOCUS 
SELECTION_BACKGROUND 
SELECTION_FOREGROUND 

enum ONE::gui::DID
 

holds the delegate IDs for components

All components provided by this framework are contained in the list. User components must provided delegate IDs starting with FIRST_USER_CMP.

Enumerator:
DEFAULT_CMP 
WINDOW 
FRAME 
FRAME_TITLEBAR 
DEFAULT_BORDER 
EMPTY_BORDER 
LINE_BORDER 
LOWERED_BORDER 
RAISED_BORDER 
PANEL 
VIEWPORT 
SCROLLBAR 
SCROLLBAR_SLIDER 
LABEL 
TOGGLE_BUTTON 
BUTTON 
TEXTFIELD 
LIST 
CONSOLE 
CHECKBOX 
RADIOBUTTON 
FIRST_USER_CMP 

enum ONE::gui::HorzAlignment
 

accepted values for the HALIGN property.

Enumerator:
HCENTER  center horizontally
LEFT  flush left
RIGHT  flush right

enum ONE::gui::IconID
 

place-holders for icons used by the framework

Enumerator:
UNKNOWN_ICON 
CLOSE_ICON 
ARROW_UP_ICON 
ARROW_DOWN_ICON 
ARROW_LEFT_ICON 
ARROW_RIGHT_ICON 
TICK_BOX_ICON 
TICK_ICON 

enum ONE::gui::Orientation
 

valid orientations

Enumerator:
HORIZONTAL 
VERTICAL 

enum ONE::gui::Property
 

defines properties that may be modified through the GuiManager.

Users may add properties starting with FIRST_USER_PROPERTY.

Enumerator:
HALIGN  horizontal alignment
VALIGN  vertical alignment
COLOR 
OPACITY 
FONT 
CLICK_COUNT  the number of clicks required for an activation
ROW_HEIGHT  the pixel height for a row
COL_WIDTH  the pixel width for a column
FIRST_USER_PROPERTY  all user properties must follow this value

enum ONE::gui::StdAction
 

Enumerator:
FIRST_STD_CMD 
CLOSE_ACTION  close or destroy action
EXECUTE_ACTION  widget execution, usually on <enter>
CLICK_ACTION  mouse click
DRAG_ACTION  mouse drag
POPUP_ACTION  popup command
STEP_UP_ACTION  a step up, usually by a cursor or similar
STEP_DOWN_ACTION  a step down
STEP_LEFT_ACTION  a step to the left
STEP_RIGHT_ACTION  a step to the right

enum ONE::gui::VertAlignment
 

accepted values for the VALIGN property.

Enumerator:
VCENTER  center vertically
TOP  pull to top
BOTTOM  push to bottom


Generated on Wed Sep 7 19:03:14 2005 for ONEngine by  doxygen 1.4.3