#include <xap_UnixWidget.h>
Public Member Functions | |
XAP_UnixWidget (GtkWidget *w) | |
virtual | ~XAP_UnixWidget () |
The destructor just clean up. | |
virtual void | setState (bool enabled) |
set the widget enabled/disabled state | |
virtual bool | getState (void) |
set the widget enabled/disabled state | |
virtual void | setVisible (bool visible) |
set the widget visible state | |
virtual bool | getVisible (void) |
get the widget visible state | |
virtual void | setValueInt (int val) |
set the widget int value | |
virtual int | getValueInt (void) |
get the widget int value | |
virtual void | setValueString (const UT_UTF8String &val) |
set the widget value as string | |
virtual void | getValueString (UT_UTF8String &val) |
get the widget value as string | |
virtual void | setValueFloat (float val) |
set the widget value as float | |
virtual float | getValueFloat (void) |
get the widget value as float | |
virtual void | setLabel (const UT_UTF8String &val) |
set the widget label | |
virtual void | setLabel (const std::string &val) |
void | setData (const std::string &data) |
Private Member Functions | |
void | setLabelCStr (const char *val) |
Private Attributes | |
GtkWidget * | m_widget |
std::string | m_data |
ABI_W_NO_CONST_QUAL ABI_W_POP XAP_UnixWidget::XAP_UnixWidget | ( | GtkWidget * | w | ) |
virtual XAP_UnixWidget::~XAP_UnixWidget | ( | ) | [inline, virtual] |
The destructor just clean up.
Must not destroy the real widget.
bool XAP_UnixWidget::getState | ( | void | ) | [virtual] |
float XAP_UnixWidget::getValueFloat | ( | void | ) | [virtual] |
get the widget value as float
Implements XAP_Widget.
References UT_ASSERT_HARMLESS, and UT_NOT_IMPLEMENTED.
int XAP_UnixWidget::getValueInt | ( | void | ) | [virtual] |
get the widget int value
Implements XAP_Widget.
References m_widget, UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.
void XAP_UnixWidget::getValueString | ( | UT_UTF8String & | val | ) | [virtual] |
get the widget value as string
Implements XAP_Widget.
References UT_UTF8String::assign(), m_widget, UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.
bool XAP_UnixWidget::getVisible | ( | void | ) | [virtual] |
void XAP_UnixWidget::setData | ( | const std::string & | data | ) | [inline] |
References m_data.
Referenced by AP_UnixDialog_WordCount::getWidget().
void XAP_UnixWidget::setLabel | ( | const UT_UTF8String & | val | ) | [virtual] |
set the widget label
Implements XAP_Widget.
References setLabelCStr(), and UT_UTF8String::utf8_str().
void XAP_UnixWidget::setLabel | ( | const std::string & | val | ) | [virtual] |
Implements XAP_Widget.
References setLabelCStr().
void XAP_UnixWidget::setLabelCStr | ( | const char * | val | ) | [private] |
References m_data, m_widget, UT_ASSERT_HARMLESS, UT_SHOULD_NOT_HAPPEN, and UT_std_string_sprintf().
Referenced by setLabel().
void XAP_UnixWidget::setState | ( | bool | enabled | ) | [virtual] |
void XAP_UnixWidget::setValueFloat | ( | float | val | ) | [virtual] |
set the widget value as float
Implements XAP_Widget.
References m_widget, and UT_std_string_sprintf().
void XAP_UnixWidget::setValueInt | ( | int | val | ) | [virtual] |
set the widget int value
Implements XAP_Widget.
References m_widget, UT_ASSERT_HARMLESS, UT_SHOULD_NOT_HAPPEN, and UT_std_string_sprintf().
void XAP_UnixWidget::setValueString | ( | const UT_UTF8String & | val | ) | [virtual] |
set the widget value as string
Implements XAP_Widget.
References m_widget, UT_ASSERT_HARMLESS, UT_SHOULD_NOT_HAPPEN, and UT_UTF8String::utf8_str().
void XAP_UnixWidget::setVisible | ( | bool | visible | ) | [virtual] |
std::string XAP_UnixWidget::m_data [private] |
Referenced by setData(), and setLabelCStr().
GtkWidget* XAP_UnixWidget::m_widget [private] |
Referenced by getState(), getValueInt(), getValueString(), getVisible(), setLabelCStr(), setState(), setValueFloat(), setValueInt(), setValueString(), and setVisible().