Photon microGUI widgets library 0.6.0
PhWidgets Namespace Reference

The main namespace for all widgets. More...

Namespaces

namespace  Drawing
 The PhWidgets::Drawing namespace provides access to basic graphics functionality.
 

Classes

struct  AnchorStyles
 Specifies how a widget anchors to the edges of its container. More...
 
struct  BalloonPosition
 Indicates where the balloon with the Label 's text pops up. More...
 
struct  Basic
 A superclass of basic resources for most widgets. More...
 
struct  Button
 A button for initiating an action. More...
 
struct  ComboBox
 A text field with a list of choices. More...
 
struct  ComboBoxStyle
 Specifies the ComboBox style. More...
 
struct  Compound
 Superclass for all compound widgets. More...
 
struct  Container
 Layout and geometry management for all container widgets. More...
 
class  Cursor
 Represents the image used to paint the mouse pointer. More...
 
struct  Cursors
 Provides a collection of standard cursors for use by a Photon microGUI application. More...
 
struct  Disjoint
 Superclass for disjoint widgets. More...
 
struct  Gauge
 Common class for gauge-type widgets. More...
 
struct  Graphic
 Common resources for graphical widgets. More...
 
struct  ImageArea
 Represents an image area widget for displaying an image. More...
 
struct  Label
 A text, bitmap, or image label. More...
 
struct  LabelType
 The type of information displayed by the Label. More...
 
struct  Numeric
 A superclass for numeric widgets. More...
 
struct  NumericFloat
 Floating-point numeric widget. More...
 
struct  NumericInteger
 Integer numeric widget. More...
 
struct  OnOffButton
 An on/off button that can be set or unset. More...
 
struct  Pane
 A container for organizing widgets. More...
 
class  TextWidget
 Single-line text. More...
 
struct  Timer
 A widget that invokes a callback after a given length of time. More...
 
struct  ToggleButton
 A toggle switch that's either off or on. More...
 
struct  ToggleIndicatorType
 Specifies how the indicator of ToggleButton is drawn. More...
 
struct  UnderlineType
 The type of Label underline. More...
 
struct  Widget
 Superclass for all widgets. More...
 
struct  Window
 An Application window that's managed by the Photon window manager. More...
 

Typedefs

typedef PhWidgets::TextWidget Text
 Single-line text. More...
 

Functions

template<class WidgetT >
PtWidget_tdynamic_widget_cast (typename stdex::enable_if< cppproperties::detail::is_convertable< typename stdex::remove_cv< WidgetT >::type, Widget & >::value, const Widget & >::type widget) throw ()
 Dynamic cast of PhWidgets::Widget. More...
 

Detailed Description

The main namespace for all widgets.

Typedef Documentation

◆ Text

Single-line text.

The Photon text widgets let you type textual information into a text-entry box. The widgets provide basic editing features, so you can alter text that's entered. They also support a point-and-click model of editing, so that you can operate on blocks of text as a unit.

Function Documentation

◆ dynamic_widget_cast()

template<class WidgetT >
PtWidget_t * PhWidgets::dynamic_widget_cast ( typename stdex::enable_if< cppproperties::detail::is_convertable< typename stdex::remove_cv< WidgetT >::type, Widget & >::value, const Widget & >::type  widget)
throw (
)
inline

Dynamic cast of PhWidgets::Widget.

Parameters
[in]widgetThe Widget to cast.
Returns
PtWidget_t *

Perform dynamic_cast on input widget and returns corresponding valid pointer to PtWidget_t or nullptr if cast cannot be performed.

Examples

For the following example there should be PhWidgets::Window main_window somewhere.

using namespace PhWidgets;
std::set<Widget> widgets = main_window.Widgets;
// turn all buttons of the form red
for(std::set<Widget>::iterator iterator it = widgets.begin(); it != widgets.end(); ++it)
{
if(nullptr != dynamic_widget_cast<Button>(*it))
{
Button button = *it;
}
}
phproperty< Drawing::Color >::bind< Basic, Arguments< PgColor_t >::ColorResource, Arguments<>::DrawingColor > Color
Gets or sets the foreground or drawing color for the widget.
Definition: Basic.h:460
A button for initiating an action.
Definition: Button.h:24
The main namespace for all widgets.
Definition: Basic.h:11
@ Red
System-defined color that has an ARGB value of #FFFF0000.
Definition: Color.h:144
See also