#include <ap_UnixDialog_Tab.h>
Public Member Functions | |
AP_UnixDialog_Tab (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id) | |
Ctor. | |
virtual | ~AP_UnixDialog_Tab (void) |
Dtor. | |
virtual void | runModal (XAP_Frame *pFrame) |
Abi style run method. | |
void | onDefaultTabChanged (double value) |
void | onDefaultTabFocusOut (void) |
Validate tab width, apply if ok. | |
void | onTabSelected (void) |
Dispatch tab selection to xp land. | |
void | onPositionChanged (double value) |
void | onPositionFocusOut (void) |
Validate tab position, apply if ok. | |
void | onAlignmentChanged (void) |
Dispatch event to xp-land and auto-apply. | |
void | onLeaderChanged (void) |
Dispatch event to xp-land and auto-apply. | |
void | onAddTab (void) |
Add tab and apply to paragraph. | |
void | onDeleteTab (void) |
Delete tab and apply to paragraph. | |
GtkWidget * | getWindow (void) |
Static Public Member Functions | |
static XAP_Dialog * | static_constructor (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id) |
Abi style static ctor. | |
Protected Member Functions | |
GtkWidget * | _lookupWidget (tControl id) |
virtual void | _controlEnable (tControl id, bool value) |
Set widget state by id. | |
void | _spinChanged (void) |
SET_GATHER (Alignment, eTabType) | |
SET_GATHER (Leader, eTabLeader) | |
SET_GATHER (DefaultTabStop, const gchar *) | |
virtual void | _setTabList (UT_uint32 count) |
Update list of tabs. | |
SET_GATHER (SelectTab, UT_sint32) | |
SET_GATHER (TabEdit, const char *) | |
virtual void | _clearList () |
Clear list of tab stops. | |
virtual GtkWidget * | _constructWindow (void) |
Private Member Functions | |
void | _connectSignals (GtkBuilder *builder) |
Connect callbacks. | |
UT_sint32 | _getSelectedIndex (void) |
Private Attributes | |
GtkBuilder * | m_pBuilder |
GtkWidget * | m_wDialog |
GtkWidget * | m_sbDefaultTab |
GtkWidget * | m_exUserTabs |
GtkWidget * | m_lvTabs |
GtkWidget * | m_btDelete |
GtkWidget * | m_sbPosition |
GtkWidget * | m_cobAlignment |
GtkWidget * | m_cobLeader |
GtkTreeSelection * | m_tsSelection |
gchar * | m_AlignmentMapping [__FL_TAB_MAX] |
gchar * | m_LeaderMapping [__FL_LEADER_MAX] |
guint | m_hSigDefaultTabChanged |
guint | m_hSigPositionChanged |
guint | m_hSigAlignmentChanged |
guint | m_hSigLeaderChanged |
guint | m_hTabSelected |
AP_UnixDialog_Tab::AP_UnixDialog_Tab | ( | XAP_DialogFactory * | pDlgFactory, | |
XAP_Dialog_Id | id | |||
) |
Ctor.
Referenced by static_constructor().
AP_UnixDialog_Tab::~AP_UnixDialog_Tab | ( | void | ) | [virtual] |
Dtor.
References m_AlignmentMapping, m_LeaderMapping, and m_pBuilder.
void AP_UnixDialog_Tab::_clearList | ( | ) | [protected, virtual] |
void AP_UnixDialog_Tab::_connectSignals | ( | GtkBuilder * | builder | ) | [private] |
Connect callbacks.
References AP_UnixDialog_Tab__onAddTab(), AP_UnixDialog_Tab__onAlignmentChanged(), AP_UnixDialog_Tab__onCloseWindow(), AP_UnixDialog_Tab__onDefaultTabChanged(), AP_UnixDialog_Tab__onDefaultTabFocusOut(), AP_UnixDialog_Tab__onDeleteTab(), AP_UnixDialog_Tab__onLeaderChanged(), AP_UnixDialog_Tab__onPositionChanged(), AP_UnixDialog_Tab__onPositionFocusOut(), AP_UnixDialog_Tab__onTabSelected(), m_btDelete, m_cobAlignment, m_cobLeader, m_hSigAlignmentChanged, m_hSigDefaultTabChanged, m_hSigLeaderChanged, m_hSigPositionChanged, m_hTabSelected, m_lvTabs, m_sbDefaultTab, m_sbPosition, and m_tsSelection.
Referenced by _constructWindow().
GtkWidget * AP_UnixDialog_Tab::_constructWindow | ( | void | ) | [protected, virtual] |
References _connectSignals(), COLUMN_TAB, gchar, XAP_App::getStringSet(), XAP_StringSet::getValueUTF8(), localizeLabel(), localizeLabelMarkup(), m_AlignmentMapping, m_btDelete, m_cobAlignment, m_cobLeader, AP_Dialog_Tab::m_dim, m_exUserTabs, m_LeaderMapping, m_lvTabs, XAP_Dialog::m_pApp, m_pBuilder, m_sbDefaultTab, m_sbPosition, newDialogBuilder(), NUM_COLUMNS, s, UT_getDimensionPrecisicion(), and UT_XML_cloneNoAmpersands().
Referenced by runModal().
void AP_UnixDialog_Tab::_controlEnable | ( | tControl | id, | |
bool | value | |||
) | [protected, virtual] |
Set widget state by id.
Implements AP_Dialog_Tab.
References _lookupWidget(), AP_Dialog_Tab::id_BUTTON_CLEAR, m_pBuilder, and UT_return_if_fail.
UT_sint32 AP_UnixDialog_Tab::_getSelectedIndex | ( | void | ) | [private] |
Get index of selected tab in list.
References gchar, m_lvTabs, and UT_DEBUGMSG.
Referenced by onTabSelected().
GtkWidget * AP_UnixDialog_Tab::_lookupWidget | ( | tControl | id | ) | [protected] |
Query a widget by its XP-ID. Do not trust this implementation because the unix-dialog is quite different from the others (popup menus instead of radio buttons, no clear all ...).
References AP_Dialog_Tab::id_ALIGN_BAR, AP_Dialog_Tab::id_ALIGN_CENTER, AP_Dialog_Tab::id_ALIGN_DECIMAL, AP_Dialog_Tab::id_ALIGN_LEFT, AP_Dialog_Tab::id_ALIGN_RIGHT, AP_Dialog_Tab::id_BUTTON_CANCEL, AP_Dialog_Tab::id_BUTTON_CLEAR, AP_Dialog_Tab::id_BUTTON_CLEAR_ALL, AP_Dialog_Tab::id_BUTTON_OK, AP_Dialog_Tab::id_BUTTON_SET, AP_Dialog_Tab::id_EDIT_TAB, AP_Dialog_Tab::id_last, AP_Dialog_Tab::id_LEADER_DASH, AP_Dialog_Tab::id_LEADER_DOT, AP_Dialog_Tab::id_LEADER_NONE, AP_Dialog_Tab::id_LEADER_UNDERLINE, AP_Dialog_Tab::id_LIST_TAB, AP_Dialog_Tab::id_SPIN_DEFAULT_TAB_STOP, m_cobAlignment, m_cobLeader, m_lvTabs, m_pBuilder, m_sbDefaultTab, m_sbPosition, and UT_return_val_if_fail.
Referenced by _controlEnable().
void AP_UnixDialog_Tab::_setTabList | ( | UT_uint32 | count | ) | [protected, virtual] |
Update list of tabs.
Implements AP_Dialog_Tab.
References AP_Dialog_Tab::_getTabDimensionString(), COLUMN_TAB, m_exUserTabs, and m_lvTabs.
void AP_UnixDialog_Tab::_spinChanged | ( | void | ) | [protected] |
GtkWidget* AP_UnixDialog_Tab::getWindow | ( | void | ) | [inline] |
References m_wDialog.
Referenced by AP_UnixDialog_Tab__onCloseWindow().
void AP_UnixDialog_Tab::onAddTab | ( | void | ) |
Add tab and apply to paragraph.
References AP_Dialog_Tab::_event_Set(), AP_Dialog_Tab::_getDimension(), AP_Dialog_Tab::_storeWindowData(), m_cobAlignment, m_cobLeader, m_hSigAlignmentChanged, m_hSigLeaderChanged, m_hSigPositionChanged, m_lvTabs, m_sbDefaultTab, m_sbPosition, text, UT_DEBUGMSG, and UT_formatDimensionString().
Referenced by AP_UnixDialog_Tab__onAddTab().
void AP_UnixDialog_Tab::onAlignmentChanged | ( | void | ) |
Dispatch event to xp-land and auto-apply.
References AP_Dialog_Tab::_event_AlignmentChange(), and AP_Dialog_Tab::_event_Update().
Referenced by AP_UnixDialog_Tab__onAlignmentChanged().
void AP_UnixDialog_Tab::onDefaultTabChanged | ( | double | value | ) |
Auto-apply changed tab width.
value | width. |
References AP_Dialog_Tab::_getDimension(), AP_Dialog_Tab::_storeWindowData(), dim, gchar, m_sbDefaultTab, text, UT_DEBUGMSG, and UT_formatDimensionString().
Referenced by AP_UnixDialog_Tab__onDefaultTabChanged().
void AP_UnixDialog_Tab::onDefaultTabFocusOut | ( | void | ) |
Validate tab width, apply if ok.
References AP_Dialog_Tab::_getDimension(), AP_Dialog_Tab::_storeWindowData(), dim, gchar, m_hSigDefaultTabChanged, m_sbDefaultTab, text, UT_convertDimensions(), UT_DEBUGMSG, UT_determineDimension(), UT_formatDimensionString(), and UT_isValidDimensionString().
Referenced by AP_UnixDialog_Tab__onDefaultTabFocusOut().
void AP_UnixDialog_Tab::onDeleteTab | ( | void | ) |
Delete tab and apply to paragraph.
References AP_Dialog_Tab::_event_Clear(), and AP_Dialog_Tab::_storeWindowData().
Referenced by AP_UnixDialog_Tab__onDeleteTab().
void AP_UnixDialog_Tab::onLeaderChanged | ( | void | ) |
Dispatch event to xp-land and auto-apply.
References AP_Dialog_Tab::_event_somethingChanged(), and AP_Dialog_Tab::_event_Update().
Referenced by AP_UnixDialog_Tab__onLeaderChanged().
void AP_UnixDialog_Tab::onPositionChanged | ( | double | value | ) |
Apply changed position of a tab.
value | new position. |
References AP_Dialog_Tab::_event_TabChange(), AP_Dialog_Tab::_event_Update(), AP_Dialog_Tab::_getDimension(), dim, gchar, m_hSigPositionChanged, m_hTabSelected, m_sbPosition, m_tsSelection, text, and UT_formatDimensionString().
Referenced by AP_UnixDialog_Tab__onPositionChanged().
void AP_UnixDialog_Tab::onPositionFocusOut | ( | void | ) |
Validate tab position, apply if ok.
References AP_Dialog_Tab::_event_Update(), AP_Dialog_Tab::_getDimension(), dim, gchar, m_hSigPositionChanged, m_sbPosition, text, UT_convertDimensions(), UT_DEBUGMSG, UT_determineDimension(), UT_formatDimensionString(), and UT_isValidDimensionString().
Referenced by AP_UnixDialog_Tab__onPositionFocusOut().
void AP_UnixDialog_Tab::onTabSelected | ( | void | ) |
Dispatch tab selection to xp land.
References AP_Dialog_Tab::_event_TabSelected(), and _getSelectedIndex().
Referenced by AP_UnixDialog_Tab__onTabSelected().
void AP_UnixDialog_Tab::runModal | ( | XAP_Frame * | pFrame | ) | [virtual] |
Abi style run method.
Implements AP_Dialog_Tab.
References _constructWindow(), AP_Dialog_Tab::_populateWindowData(), abiRunModalDialog(), AP_Dialog_Tab::m_pFrame, m_wDialog, and UT_return_if_fail.
AP_UnixDialog_Tab::SET_GATHER | ( | TabEdit | , | |
const char * | ||||
) | [protected] |
Reimplemented from AP_Dialog_Tab.
AP_UnixDialog_Tab::SET_GATHER | ( | SelectTab | , | |
UT_sint32 | ||||
) | [protected] |
Reimplemented from AP_Dialog_Tab.
AP_UnixDialog_Tab::SET_GATHER | ( | Leader | , | |
eTabLeader | ||||
) | [protected] |
Reimplemented from AP_Dialog_Tab.
AP_UnixDialog_Tab::SET_GATHER | ( | DefaultTabStop | , | |
const gchar * | ||||
) | [protected] |
Reimplemented from AP_Dialog_Tab.
AP_UnixDialog_Tab::SET_GATHER | ( | Alignment | , | |
eTabType | ||||
) | [protected] |
Reimplemented from AP_Dialog_Tab.
XAP_Dialog * AP_UnixDialog_Tab::static_constructor | ( | XAP_DialogFactory * | pDlgFactory, | |
XAP_Dialog_Id | id | |||
) | [static] |
Abi style static ctor.
References AP_UnixDialog_Tab().
gchar* AP_UnixDialog_Tab::m_AlignmentMapping[__FL_TAB_MAX] [private] |
Referenced by _constructWindow(), and ~AP_UnixDialog_Tab().
GtkWidget* AP_UnixDialog_Tab::m_btDelete [private] |
Referenced by _connectSignals(), and _constructWindow().
GtkWidget* AP_UnixDialog_Tab::m_cobAlignment [private] |
Referenced by _connectSignals(), _constructWindow(), _lookupWidget(), and onAddTab().
GtkWidget* AP_UnixDialog_Tab::m_cobLeader [private] |
Referenced by _connectSignals(), _constructWindow(), _lookupWidget(), and onAddTab().
GtkWidget* AP_UnixDialog_Tab::m_exUserTabs [private] |
Referenced by _constructWindow(), and _setTabList().
guint AP_UnixDialog_Tab::m_hSigAlignmentChanged [private] |
Referenced by _connectSignals(), and onAddTab().
guint AP_UnixDialog_Tab::m_hSigDefaultTabChanged [private] |
Referenced by _connectSignals(), and onDefaultTabFocusOut().
guint AP_UnixDialog_Tab::m_hSigLeaderChanged [private] |
Referenced by _connectSignals(), and onAddTab().
guint AP_UnixDialog_Tab::m_hSigPositionChanged [private] |
Referenced by _connectSignals(), onAddTab(), onPositionChanged(), and onPositionFocusOut().
guint AP_UnixDialog_Tab::m_hTabSelected [private] |
Referenced by _connectSignals(), and onPositionChanged().
gchar* AP_UnixDialog_Tab::m_LeaderMapping[__FL_LEADER_MAX] [private] |
Referenced by _constructWindow(), and ~AP_UnixDialog_Tab().
GtkWidget* AP_UnixDialog_Tab::m_lvTabs [private] |
Referenced by _clearList(), _connectSignals(), _constructWindow(), _getSelectedIndex(), _lookupWidget(), _setTabList(), and onAddTab().
GtkBuilder* AP_UnixDialog_Tab::m_pBuilder [private] |
Referenced by _constructWindow(), _controlEnable(), _lookupWidget(), and ~AP_UnixDialog_Tab().
GtkWidget* AP_UnixDialog_Tab::m_sbDefaultTab [private] |
Referenced by _connectSignals(), _constructWindow(), _lookupWidget(), onAddTab(), onDefaultTabChanged(), and onDefaultTabFocusOut().
GtkWidget* AP_UnixDialog_Tab::m_sbPosition [private] |
Referenced by _connectSignals(), _constructWindow(), _lookupWidget(), onAddTab(), onPositionChanged(), and onPositionFocusOut().
GtkTreeSelection* AP_UnixDialog_Tab::m_tsSelection [private] |
Referenced by _connectSignals(), and onPositionChanged().
GtkWidget* AP_UnixDialog_Tab::m_wDialog [private] |
Referenced by getWindow(), and runModal().