Photon microGUI widgets library 0.6.0
Loading...
Searching...
No Matches
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...
 
class  Basic
 A superclass of basic resources for most widgets. More...
 
class  Button
 A button for initiating an action. More...
 
class  ComboBox
 A text field with a list of choices. More...
 
struct  ComboBoxStyle
 Specifies the ComboBox style. More...
 
class  Compound
 Superclass for all compound widgets. More...
 
class  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...
 
class  Disjoint
 Superclass for disjoint widgets. More...
 
class  Gauge
 Common class for gauge-type widgets. More...
 
class  Graphic
 Common resources for graphical widgets. More...
 
class  ImageArea
 Represents an image area widget for displaying an image. More...
 
class  Label
 A text, bitmap, or image label. More...
 
struct  LabelType
 The type of information displayed by the Label. More...
 
class  Numeric
 A superclass for numeric widgets. More...
 
class  NumericFloat
 Floating-point numeric widget. More...
 
class  NumericInteger
 Integer numeric widget. More...
 
class  OnOffButton
 An on/off button that can be set or unset. More...
 
class  Pane
 A container for organizing widgets. More...
 
class  TextWidget
 Single-line text. More...
 
class  Timer
 A widget that invokes a callback after a given length of time. More...
 
class  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...
 
class  Widget
 Superclass for all widgets. More...
 
class  Window
 An Application window that's managed by the Photon window manager. More...
 

Typedefs

typedef PhWidgets::TextWidget Text
 Single-line text.
 

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.
 

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.
The main namespace for all widgets.
Definition Basic.h:11
PtWidget_t * dynamic_widget_cast(typename stdex::enable_if< cppproperties::detail::is_convertable< typename stdex::remove_cv< WidgetT >::type, Widget & >::value, const Widget & >::type widget)
Dynamic cast of PhWidgets::Widget.
Definition Widget.h:2240
@ Red
System-defined color that has an ARGB value of #FFFF0000.
Definition Color.h:144
See also