Photon microGUI widgets library 0.6.0
|
Superclass for all widgets. More...
#include <Widget.h>
Public Types | |
typedef phevent::ph_callback_t | callback_t |
An event handler that is raised when an event occur. | |
Public Member Functions | |
Widget (int abn) | |
(constructor) More... | |
Widget (PtWidget_t *wdg) | |
(constructor) More... | |
Widget (const Widget &other) | |
(copy constructor) More... | |
void | swap (Widget &other) |
Exchanges the contents of *this and other. More... | |
Widget & | operator= (const Widget &other) |
Assigns value in Widget. More... | |
Widget & | operator= (PtWidget_t *wdg) |
Assigns value in Widget. More... | |
bool | operator== (const Widget &other) const |
Compares Widgets. More... | |
bool | operator!= (const Widget &other) const |
Compares Widgets. More... | |
bool | operator< (const Widget &other) const |
Compares Widgets. More... | |
bool | operator<= (const Widget &other) const |
Compares Widgets. More... | |
bool | operator> (const Widget &other) const |
Compares Widgets. More... | |
bool | operator>= (const Widget &other) const |
Compares Widgets. More... | |
PtWidget_t * | get () const |
Returns the stored pointer. | |
operator PtWidget_t * () | |
Converts Widget to Photon widget pointer. | |
operator const PtWidget_t * () const | |
Converts Widget to constant Photon widget pointer. | |
void | BringToFront () |
Brings the widget to the front of the z-order. More... | |
bool | Contains (const Widget &widget) |
Retrieves a value indicating whether the specified widget is a child of the widget. More... | |
bool | Focus () |
Sets input focus to the widget. More... | |
Widget | GetNextWidget (const Widget &widget, bool forward=true) const |
Retrieves the next widget forward or back in the tab order of child widgets. More... | |
void | Hide () |
Conceals the widget from the user. More... | |
void | Invalidate (PhRect_t rc, bool invalidateChildren=false) |
Invalidates a specific region of the widget and causes a paint message to be sent to the widget. More... | |
void | Invalidate (bool invalidateChildren=false) |
Invalidates a specific region of the widget and causes a paint message to be sent to the widget. More... | |
bool | Realize () |
Make the widget and its children visible and possibly interactive. More... | |
void | Refresh () |
Forces the widget to invalidate its client area and immediately redraw itself and any child widgets. More... | |
void | SendToBack () |
Sends the widget to the back of the z-order. More... | |
void | SetBounds (short x, short y, unsigned short width, unsigned short height) |
Sets the bounds of the widget to the specified location and size. More... | |
void | SetBounds (short x, short y) |
Sets the bounds of the widget to the specified location. More... | |
void | Select () |
Activates the widget. More... | |
void | Show () |
Displays the widget to the user. More... | |
bool | Unrealize () |
Unrealizes the widget and all its children. More... | |
Event raisers | |
void | OnDestroyed (PtCallbackInfo_t *info) |
Raises the Widget::Destroyed event. | |
void | OnBlocked (PtCallbackInfo_t *info) |
Raises the Widget::Blocked event. | |
void | OnDragDrop (PtCallbackInfo_t *info) |
Raises the Widget::DragDrop event. | |
void | OnOutbound (PtCallbackInfo_t *info) |
Raises the Widget::Outbound event. | |
void | OnRealized (PtCallbackInfo_t *info) |
Raises the Widget::Realized event. | |
void | OnUnrealized (PtCallbackInfo_t *info) |
Raises the Widget::Unrealized event. | |
Static Public Member Functions | |
static void | Update () |
Causes the Photon microGUI to redraw the all invalidated regions. More... | |
Public Attributes | |
WidgetResourcesSingleton | resource |
Resources of the Widget. More... | |
Properties | |
Properties are used to simplify use of widget resources. | |
property< bool >::bind< Widget, &Widget::getAllowDrop, &Widget::setAllowDrop > | AllowDrop |
Gets or sets a value indicating whether the widget can accept data that the user drags onto it. More... | |
phbitmask< unsigned, Flags::Anchor::type, Flags::Anchor::All >::bind< Widget, Arguments< unsigned >::Flag, Arguments< unsigned >::AnchorFlags > | Anchor |
Gets or sets flags specifying how the widget is anchored to its parent. More... | |
phproperty< unsigned short >::bind< Widget, Arguments< unsigned short >::Scalar, Arguments< unsigned short >::BevelWidth > | BevelWidth |
Gets or sets the bevel width of the widget. More... | |
property< short, property<>::ro >::bind< Widget, &Widget::getBottom > | Bottom |
Gets the distance, in pixels, between the bottom edge of the widget and the top edge of its container's client area. More... | |
property< PhArea_t >::bind< Widget, &Widget::getBounds, &Widget::setBounds > | Bounds |
Gets or sets the size and location of the widget including its nonclient elements, in pixels, relative to the parent widget. More... | |
property< bool, property<>::ro >::bind< Widget, &Widget::getCanFocus > | CanFocus |
Gets a value indicating whether the widget can receive focus. More... | |
property< bool, property<>::ro >::bind< Widget, &Widget::getCanSelect > | CanSelect |
Gets a value indicating whether the widget can be selected. More... | |
property< bool, property<>::ro >::bind< Widget, &Widget::getContainsFocus > | ContainsFocus |
Gets a value indicating whether the widget, or one of its child widgets, currently has the input focus. More... | |
property< PhWidgets::Cursor >::bind< Widget, &Widget::getCursor, &Widget::setCursor > | Cursor |
Gets or sets the cursor that is displayed when the mouse pointer is over the widget. More... | |
phproperty< Drawing::Color >::bind< Widget, Arguments< PgColor_t >::Color, Arguments< PgColor_t >::CursorColor > | CursorColor |
Gets or sets the color of the cursor pointer when it's inside the widget. More... | |
property< bool >::bind< Widget, &Widget::getEnabled, &Widget::setEnabled > | Enabled |
Gets or sets a value indicating whether the widget can respond to user interaction. More... | |
property< bool, property<>::ro >::bind< Widget, &Widget::getFocused > | Focused |
Gets a value indicating whether the widget has input focus. More... | |
property< bool, property<>::ro >::bind< Widget, &Widget::hasChildren > | HasChildren |
Gets a value indicating whether the widget contains one or more child widgets. More... | |
property< bool, property<>::ro >::bind< Widget, &Widget::hasParent > | HasParent |
Gets a value indicating whether the widget has parent. More... | |
phproperty< unsigned short >::bind< Widget, Arguments< unsigned short >::Scalar, Arguments< unsigned short >::Height > | Height |
Gets or sets the height of the widget. More... | |
property< std::string >::bind< Widget, &Widget::getHelpTopic, &Widget::setHelpTopic > | HelpTopic |
Gets or sets the help topic of the widget. More... | |
property< bool, property<>::ro >::bind< Widget, &Widget::getIsRealized > | IsRealized |
Gets or sets a value indicating whether the widget is realized. More... | |
property< short >::bind< Widget, &Widget::getLeft, &Widget::setLeft > | Left |
Gets or sets the distance, in pixels, between the left edge of the widget and the left edge of its container's client area. More... | |
property< PhPoint_t >::bind< Widget, &Widget::getLocation, &Widget::setLocation > | Location |
Gets or sets the coordinates of the upper-left corner of the widget relative to the upper-left corner of its container. More... | |
property< PtWidget_t * >::bind< Widget, &Widget::getParent, &Widget::setParent > | Parent |
Gets or sets the parent container of the widget. More... | |
phproperty< PhPoint_t >::bind< Widget, Arguments< PhPoint_t >::Struct, Arguments< PhPoint_t >::Position > | Position |
Gets or sets the absolute coordinates of the upper-left corner of the widget. More... | |
property< short, property<>::ro >::bind< Widget, &Widget::getRight > | Right |
Gets the distance, in pixels, between the right edge of the widget and the left edge of its container's client area. More... | |
phproperty< PhDim_t >::bind< Widget, Arguments< PhDim_t >::Struct, Arguments< PhDim_t >::Dimension > | Size |
Gets or sets the size of the widget. More... | |
tag_property< Widget, &Widget::getTag, &Widget::setTag > | Tag |
Gets or sets the resource that contains data about the widget. More... | |
property< short >::bind< Widget, &Widget::getTop, &Widget::setTop > | Top |
Gets or sets the distance, in pixels, between the top edge of the widget and the top edge of its container's client area. More... | |
property< bool >::bind< Widget, &Widget::getVisible, &Widget::setVisible > | Visible |
Gets or sets a value indicating whether the widget and all its child widgets are displayed. More... | |
property< std::set< PhWidgets::Widget >, property<>::ro >::bind< Widget, &Widget::getWidgets > | Widgets |
Gets the list of widgets contained within the widget. More... | |
phproperty< unsigned short >::bind< Widget, Arguments< unsigned short >::Scalar, Arguments< unsigned short >::Width > | Width |
Gets or sets the width of the widget. More... | |
phbitmask< unsigned long, Flags::Extended::type >::bind< Widget, Arguments< unsigned long >::Flag, Arguments< unsigned long >::ExtendedFlags > | ExtendedFlags |
Gets or sets extended flags inherited by all widgets. See Flags::Extended::type. | |
phbitmask< long, Flags::type >::bind< Widget, Arguments< long >::Flag, Arguments< long >::Flags > | WidgetFlags |
Gets or sets flags inherited by all widgets. More... | |
phbitmask< long, Flags::Resize::type >::bind< Widget, Arguments< long >::Flag, Arguments< long >::Resiztype > | Resiztype |
Gets or sets flags to control a widget's resize policy. See Flags::Resize::type. | |
Events | |
phwidgets_event< Widget, Widget::Callbacks<>::Destroyed > | Destroyed |
Occurs when the widget is destroyed. | |
phwidgets_event< Widget, Widget::Callbacks<>::Blocked > | Blocked |
Occurs when the widget is blocked. | |
phwidgets_event< Widget, Widget::Callbacks<>::DragAndDrop > | DragDrop |
Occurs when a drag-and-drop operation is completed. | |
phwidgets_event< Widget, Widget::Callbacks<>::IsDestroyed > | IsDestroyed |
Occurs when the widget's resources are being released. | |
phwidgets_event< Widget, Widget::Callbacks<>::Outbound > | Outbound |
Occurs when you press the pointer button on the widget and then move out of the "hot spot" with the button still depressed. | |
phwidgets_event< Widget, Widget::Callbacks<>::Realized > | Realized |
Occurs when the widget is realized. | |
phwidgets_event< Widget, Widget::Callbacks<>::Unrealized > | Unrealized |
Occurs when the widget is unrealized. | |
Superclass for all widgets.
Widget is the fundamental superclass. All widgets belong to a subclass of Widget.
|
explicit |
(constructor)
Constructs a Widget by ID.
[in] | abn | ID given by PhAB to widget (like 'ABN_WIDGET_NAME'). |
|
explicit |
PhWidgets::Widget::Widget | ( | const Widget & | other | ) |
void PhWidgets::Widget::BringToFront | ( | ) |
Brings the widget to the front of the z-order.
The widget is moved to the front of the z-order. If the widget is a child of another widget, the child widget is moved to the front of the z-order. BringToFront() does not make a widget a top-level widget, and it does not raise the Widget::Paint event.
bool PhWidgets::Widget::Contains | ( | const Widget & | widget | ) |
Retrieves a value indicating whether the specified widget is a child of the widget.
[in] | widget | The Widget to evaluate. |
true
if the specified widget is a child of the widget; otherwise, false
.The following code example ensures that a Label is visible by calling its BringToFront() method. This example requires that you have a Window main_window
with a Label named label1
.
bool PhWidgets::Widget::Focus | ( | ) |
Sets input focus to the widget.
true
if the input focus request was successful; otherwise, false
.true
if the widget successfully received input focus. The widget can have the input focus while not displaying any visual cues of having the focus. This behavior is primarily observed by the nonselectable widgets listed below, or any widgets derived from them. Retrieves the next widget forward or back in the tab order of child widgets.
[in] | widget | The Widget to start the search with. |
[in] | forward | true to search forward in the tab order; false to search backward. |
std::out_of_range |
void PhWidgets::Widget::Hide | ( | ) |
Conceals the widget from the user.
false
. After the Hide() method is called, the Widget::Visible property returns a value of false
until the Show() method is called.void PhWidgets::Widget::Invalidate | ( | bool | invalidateChildren = false | ) |
Invalidates a specific region of the widget and causes a paint message to be sent to the widget.
[in] | invalidateChildren | true to invalidate the widget's child widgets; otherwise, false . |
Invalidates a specific region of the widget and causes a paint message to be sent to the widget. Optionally, invalidates the child widgets assigned to the widget.
void PhWidgets::Widget::Invalidate | ( | PhRect_t | rc, |
bool | invalidateChildren = false |
||
) |
Invalidates a specific region of the widget and causes a paint message to be sent to the widget.
[in] | rc | The Rectangle to invalidate. |
[in] | invalidateChildren | true to invalidate the widget's child widgets; otherwise, false . |
Invalidates the specified region of the widget (adds it to the widget's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the widget. Optionally, invalidates the child widgets assigned to the widget.
bool PhWidgets::Widget::operator!= | ( | const Widget & | other | ) | const |
Compares Widgets.
Compares the Widgets by their Photon widget pointers.
[in] | other | Widget whose contents to compare. |
bool PhWidgets::Widget::operator< | ( | const Widget & | other | ) | const |
Compares Widgets.
Compares the Widgets by their Photon widget pointers.
[in] | other | Widget whose contents to compare. |
bool PhWidgets::Widget::operator<= | ( | const Widget & | other | ) | const |
Compares Widgets.
Compares the Widgets by their Photon widget pointers.
[in] | other | Widget whose contents to compare. |
Widget & PhWidgets::Widget::operator= | ( | PtWidget_t * | wdg | ) |
bool PhWidgets::Widget::operator== | ( | const Widget & | other | ) | const |
Compares Widgets.
Compares the Widgets by their Photon widget pointers.
[in] | other | Widget whose contents to compare. |
bool PhWidgets::Widget::operator> | ( | const Widget & | other | ) | const |
Compares Widgets.
Compares the Widgets by their Photon widget pointers.
[in] | other | Widget whose contents to compare. |
bool PhWidgets::Widget::operator>= | ( | const Widget & | other | ) | const |
Compares Widgets.
Compares the Widgets by their Photon widget pointers.
[in] | other | Widget whose contents to compare. |
bool PhWidgets::Widget::Realize | ( | ) |
Make the widget and its children visible and possibly interactive.
Make a widget and its children visible to the user and possibly interactive.
true
if the realize request was successful; otherwise, false
.void PhWidgets::Widget::Refresh | ( | ) |
Forces the widget to invalidate its client area and immediately redraw itself and any child widgets.
void PhWidgets::Widget::Select | ( | ) |
Activates the widget.
The Select method activates the widget if the widget's Widget::Flags::Selectable flag of Widget::Arguments::flags is set true, it is contained in another widget, and all its parent widget are both visible and enabled.
void PhWidgets::Widget::SendToBack | ( | ) |
Sends the widget to the back of the z-order.
The widget is moved to the back of the z-order. If the widget is a child of another widget, the child widget is moved to the back of the z-order. If the widget is a top-level widget, this method will not work correctly unless the widget is active. A top-level widget is a widget, such as a Form, that is not a child of another widget. An active widget is a visible widget that has input focus. To use the SendToBack() method with an inactive, top-level widget, first call the BringToFront() method on the widget.
void PhWidgets::Widget::SetBounds | ( | short | x, |
short | y | ||
) |
Sets the bounds of the widget to the specified location.
[in] | x | The new Widget::Left property value of the widget. |
[in] | y | The new Widget::Top property value of the widget. |
void PhWidgets::Widget::SetBounds | ( | short | x, |
short | y, | ||
unsigned short | width, | ||
unsigned short | height | ||
) |
Sets the bounds of the widget to the specified location and size.
[in] | x | The new Widget::Left property value of the widget. |
[in] | y | The new Widget::Top property value of the widget. |
[in] | width | The new Widget::Width property value of the widget. |
[in] | height | The new Widget::Height property value of the widget. |
void PhWidgets::Widget::Show | ( | ) |
Displays the widget to the user.
true
. After the Show() method is called, the Widget::Visible property returns a value of true
until the Hide() method is called.void PhWidgets::Widget::swap | ( | Widget & | other | ) |
Exchanges the contents of *this and other.
[in] | other | widget to exchange the contents with. |
bool PhWidgets::Widget::Unrealize | ( | ) |
Unrealizes the widget and all its children.
The widgets are removed from the display, and the widget engine will no longer invoke their callbacks. Unrealized widgets still exist in the widget hierarchy and can be realized again.
false
.true
if the unrealize request was successful; otherwise, false
.
|
static |
Causes the Photon microGUI to redraw the all invalidated regions.
Executes any pending requests for painting.
The Invalidate() method governs what gets painted or repainted. The Update() method governs when the painting or repainting occurs. If you use the Invalidate() and Update() methods together rather than calling Refresh(), what gets repainted depends on which overload of Invalidate() you use. The Update() method just forces the widget to be painted immediately, but the Invalidate() method governs what gets painted when you call the Update() method.
property<bool>::bind<Widget, &Widget::getAllowDrop, &Widget::setAllowDrop> PhWidgets::Widget::AllowDrop |
Gets or sets a value indicating whether the widget can accept data that the user drags onto it.
bool
true
if drag-and-drop operations are allowed in the widget; otherwise, false
. The default is false
.
phbitmask<unsigned, Flags::Anchor::type, Flags::Anchor::All>:: bind<Widget, Arguments<unsigned>::Flag, Arguments<unsigned>::AnchorFlags> PhWidgets::Widget::Anchor |
Gets or sets flags specifying how the widget is anchored to its parent.
A bitwise combination of the Flags::Anchor::type values.
property<short, property<>::ro>::bind<Widget, &Widget::getBottom> PhWidgets::Widget::Bottom |
Gets the distance, in pixels, between the bottom edge of the widget and the top edge of its container's client area.
short
An short
representing the distance, in pixels, between the bottom edge of the widget and the top edge of its container's client area.
Gets or sets the size and location of the widget including its nonclient elements, in pixels, relative to the parent widget.
A PhArea_t
in pixels relative to the parent widget that represents the size and location of the widget including its nonclient elements.
property<bool, property<>::ro>::bind<Widget, &Widget::getCanFocus> PhWidgets::Widget::CanFocus |
Gets a value indicating whether the widget can receive focus.
bool
true
if the widget can receive focus; otherwise, false
.
true
for both the widget and all its parent widgets, and the widget must be a PhWidgets::Window or the widget's outermost parent must be a PhWidgets::Window.property<bool, property<>::ro>::bind<Widget, &Widget::getCanSelect> PhWidgets::Widget::CanSelect |
Gets a value indicating whether the widget can be selected.
bool
true
if the widget can be selected; otherwise, false
.
true
if the Widget::Flags::Selectable flag of Widget::Arguments::flags is set, is contained in another widget, the widget itself is visible and enabled, and all its parent widget are visible and enabled.property<bool, property<>::ro>::bind<Widget, &Widget::getContainsFocus> PhWidgets::Widget::ContainsFocus |
Gets a value indicating whether the widget, or one of its child widgets, currently has the input focus.
bool
true
if the widget or one of its child widgets currently has the input focus; otherwise, false
.
property<PhWidgets::Cursor>::bind<Widget, &Widget::getCursor, &Widget::setCursor> PhWidgets::Widget::Cursor |
Gets or sets the cursor that is displayed when the mouse pointer is over the widget.
A Cursor that represents the cursor to display when the mouse pointer is over the widget.
phproperty<Drawing::Color>::bind<Widget, Arguments<PgColor_t>::Color, Arguments<PgColor_t>::CursorColor> PhWidgets::Widget::CursorColor |
Gets or sets the color of the cursor pointer when it's inside the widget.
A Drawing::Color that represents the color of the cursor pointer when it's inside the widget.
property<bool>::bind<Widget, &Widget::getEnabled, &Widget::setEnabled> PhWidgets::Widget::Enabled |
Gets or sets a value indicating whether the widget can respond to user interaction.
bool
true
if the widget can respond to user interaction; otherwise, false
. The default is true
.
false
, all its contained widgets are disabled, as well. For example, if the user clicks on any of the widgets contained in a disabled Container widget, no events are raised.false
does not disable the application's widget box or prevent the application Window from receiving the focus.property<bool, property<>::ro>::bind<Widget, &Widget::getFocused> PhWidgets::Widget::Focused |
property<bool, property<>::ro>::bind<Widget, &Widget::hasChildren> PhWidgets::Widget::HasChildren |
property<bool, property<>::ro>::bind<Widget, &Widget::hasParent> PhWidgets::Widget::HasParent |
phproperty<unsigned short>::bind<Widget, Arguments<unsigned short>::Scalar, Arguments<unsigned short>::Height> PhWidgets::Widget::Height |
Gets or sets the height of the widget.
unsigned short
The height of the widget in pixels.
property<std::string>::bind<Widget, &Widget::getHelpTopic, &Widget::setHelpTopic> PhWidgets::Widget::HelpTopic |
property<bool, property<>::ro>::bind<Widget, &Widget::getIsRealized> PhWidgets::Widget::IsRealized |
property<short>::bind<Widget, &Widget::getLeft, &Widget::setLeft> PhWidgets::Widget::Left |
Gets or sets the distance, in pixels, between the left edge of the widget and the left edge of its container's client area.
short
An short
representing the distance, in pixels, between the left edge of the widget and the left edge of its container's client area.
x
value of the Widget::Location property value of the widget. property<PhPoint_t>::bind<Widget, &Widget::getLocation, &Widget::setLocation> PhWidgets::Widget::Location |
Gets or sets the coordinates of the upper-left corner of the widget relative to the upper-left corner of its container.
The PhPoint_t
that represents the upper-left corner of the widget relative to the upper-left corner of its container.
PhPoint_t
struct is a value type, it is returned by value, meaning accessing the property returns a copy of the upper-left point of the widget. So, adjusting the x
or y
values of the PhPoint_t
returned from this property will not affect the Widget::Left, Widget::Right, Widget::Top, or Widget::Bottom property values of the widget. To adjust these properties set each property value individually, or set the Widget::Location property with a new PhPoint_t
. property<PtWidget_t*>::bind<Widget, &Widget::getParent, &Widget::setParent> PhWidgets::Widget::Parent |
Gets or sets the parent container of the widget.
PtWidget_t *
The pointer to PtWidget_t
that represents the parent or container widget of the widget.
std::logic_error | in case widget couldn't be reparented; std::invalid_argument in case bad parent widget passed. |
widget.HasParent
before assingning this property to Widget class if you are unsure that widget have parent at first place.phproperty<PhPoint_t>::bind<Widget, Arguments<PhPoint_t>::Struct, Arguments<PhPoint_t>::Position> PhWidgets::Widget::Position |
Gets or sets the absolute coordinates of the upper-left corner of the widget.
The PhPoint_t
that represents the absolute coordinates of the upper-left corner of the widget.
PhPoint_t
struct is a value type, it is returned by value, meaning accessing the property returns a copy of the upper-left point of the widget. So, adjusting the x
or y
values of the PhPoint_t
returned from this property will not affect the Widget::Left, Widget::Right, Widget::Top, or Widget::Bottom property values of the widget. To adjust these properties set each property value individually, or set the Widget::Position property with a new PhPoint_t
. WidgetResourcesSingleton PhWidgets::Widget::resource |
Resources of the Widget.
All resources of the Widget could be accessed by using PhWidgets::Widget::resource. As an example:
and so on...
There are two types of resources:
Each resource could be obtained using Widget::Arguments::$argument_tag$ or Widget::Callbacks::$callback_tag$ respectively.
For convenient use of resources each widget has properties and events. So with properties the code snippet above could shrink to:
property<short, property<>::ro>::bind<Widget, &Widget::getRight> PhWidgets::Widget::Right |
Gets the distance, in pixels, between the right edge of the widget and the left edge of its container's client area.
short
An short
representing the distance, in pixels, between the right edge of the widget and the left edge of its container's client area.
phproperty<PhDim_t>::bind<Widget, Arguments<PhDim_t>::Struct, Arguments<PhDim_t>::Dimension> PhWidgets::Widget::Size |
Gets or sets the size of the widget.
The PhDim_t
that represents the height and width of the widget in pixels.
PhDim_t
struct is a value type, it is returned by value, meaning accessing the property returns a copy of the size of the widget. So, adjusting the w
or h
values of the PhDim_t
returned from this property will not affect the Widget::Width or Widget::Height property values of the widget. To adjust these properties set each property value individually, or set the Widget::Size property with a new PhDim_t
.tag_property<Widget, &Widget::getTag, &Widget::setTag> PhWidgets::Widget::Tag |
Gets or sets the resource that contains data about the widget.
const void*
An const void *
that contains data about the widget. The default is nullptr
.
widget.Tag(ptr, size)
method.set
if your intentions are to copy dynamic array! Use widget.Tag(ptr, size)
method instead. See example below:const void*
that is casted to user-provided type so be really carefull with all casts! Make shure that you know the exact type hiding beneath the pointer or the behaviour is undefined. nullptr
as a result if you will try to do some really unapropriate cast - do not rely on it much!property<short>::bind<Widget, &Widget::getTop, &Widget::setTop> PhWidgets::Widget::Top |
Gets or sets the distance, in pixels, between the top edge of the widget and the top edge of its container's client area.
short
An short
representing the distance, in pixels, between the top edge of the widget and the top edge of its container's client area.
y
value of the Widget::Location property value of the widget. property<bool>::bind<Widget, &Widget::getVisible, &Widget::setVisible> PhWidgets::Widget::Visible |
Gets or sets a value indicating whether the widget and all its child widgets are displayed.
bool
true
if the widget and all its child widgets are displayed; otherwise, false
. The default is true
.
true
, the widget might not be visible to the user if it is obscured behind other widgets.phbitmask<long, Flags::type>:: bind<Widget, Arguments<long>::Flag, Arguments<long>::Flags> PhWidgets::Widget::WidgetFlags |
Gets or sets flags inherited by all widgets.
Flags that specifiy the style and behavior of a widget.
property<std::set<PhWidgets::Widget>, property<>::ro>::bind<Widget, &Widget::getWidgets> PhWidgets::Widget::Widgets |
Gets the list of widgets contained within the widget.
std::set<PhWidgets::Widget>
A std::set<PhWidgets::Widget>
representing the list of widgets contained within the widget.
std::set<PhWidgets::Widget>
assigned to the Widget::Widgets property of the Window, which is derived from the Widget class. std::set<PhWidgets::Widget>
assigned to the Widget::Widgets property by using the methods available in the std::set<PhWidgets::Widget>
class. phproperty<unsigned short>::bind<Widget, Arguments<unsigned short>::Scalar, Arguments<unsigned short>::Width> PhWidgets::Widget::Width |
Gets or sets the width of the widget.
unsigned short
The width of the widget in pixels.