libcdos-fw
|
Public 成员函数 | |
CFComboBox (bool has_entry=false) | |
Creates a new empty ComboBox, optionally with an entry. 更多... | |
Glib::ustring | getActiveId () |
Returns the ID of the active row of combo_box. 更多... | |
void | getActiveId (const Glib::ustring &active_id) |
Changes the active row of combo_box to the one that has an ID equal to active_id, or unsets the active row if active_id is nullptr . 更多... | |
int | getActiveRowNumber () |
Returns the index of the currently active item, or -1 if there’s no active item. 更多... | |
bool | getAddTearoffs () |
Gets the current title of the menu in tearoff mode. 更多... | |
CFSensitivityType | getButtonSensitivity () |
Returns whether the combo box sets the dropdown button sensitive or not when there are no items in the model. 更多... | |
int | getColumnSpanColumn () |
Returns the column with column span information for combo_box. 更多... | |
CFEntry * | getEntry () |
int | getEntryTextColumn () |
Returns the column which combo_box is using to get the strings from to display in the internal entry. 更多... | |
bool | getFocusOnClick () |
Returns whether the combo box grabs focus when it is clicked with the mouse. 更多... | |
bool | getHasEntry () |
Returns whether the combo box has an entry. 更多... | |
int | getIdColumn () |
Returns the column which combo_box is using to get string IDs for values from. 更多... | |
bool | getPopupFixedWidth () |
Gets whether the popup uses a fixed width matching the allocated width of the combo box. 更多... | |
int | getRowSpanColumn () |
Returns the column with row span information for combo_box. 更多... | |
Glib::ustring | getTitle () |
Gets the current title of the menu in tearoff mode. 更多... | |
int | getWrapWidth () |
Returns the wrap width which is used to determine the number of columns for the popup menu. 更多... | |
void | popdown () |
Hides the menu or dropdown list of combo_box. 更多... | |
void | popup () |
Pops up the menu or dropdown list of combo_box. 更多... | |
void | popup (const Glib::RefPtr< Gdk::Device > &device) |
Pops up the menu or dropdown list of combo_box, the popup window will be grabbed so only device and its associated pointer/keyboard are the only Gdk::Devices able to send events to it. 更多... | |
void | setActive (int index) |
Sets the active item of combo_box to be the item at index. 更多... | |
bool | setActiveId (const Glib::ustring &active_id) |
Changes the active row of the combo box to the one that has an ID equal to active_id. 更多... | |
void | setAddTearoffs (bool add_tearoffs=true) |
Sets whether the popup menu should have a tearoff menu item. 更多... | |
void | setButtonSensitivity (CFSensitivityType sensitivity) |
Sets whether the dropdown button of the combo box should be always sensitive (CFSENSITIVITY_ON), never sensitive (CFSENSITIVITY_OFF) or only if there is at least one item to display (CFSENSITIVITY_AUTO). 更多... | |
void | setColumnSpanColumn (int column_span) |
Sets the column with column span information for combo_box to be column_span. 更多... | |
void | setEntryTextColumn (int text_column) |
Sets the model column which combo_box should use to get strings from to be text_column. 更多... | |
void | setFocusOnClick (bool focus_on_click=true) |
Sets whether the combo box will grab focus when it is clicked with the mouse. 更多... | |
void | setIdColumn (int id_column) |
Sets the model column which combo_box should use to get string IDs for values from. 更多... | |
void | setPopupFixedWidth (bool fixed=true) |
Specifies whether the popup’s width should be a fixed width matching the allocated width of the combo box. 更多... | |
void | setRowSpanColumn (int row_span) |
Sets the column with row span information for combo_box to be row_span. 更多... | |
void | setTitle (const Glib::ustring &title) |
Sets the menu’s title in tearoff mode. 更多... | |
void | setWrapWidth (int width) |
Sets the wrap width of combo_box to be width. 更多... | |
void | unsetActive () |
Causes no item to be active. 更多... | |
void | unsetRowSeparatorFunc () |
Causes no separators to be drawn. | |
![]() | |
virtual void | add (CFWidget &widget) |
virtual void | addCssStyleData (const Glib::ustring &data, CFUInt priority) |
virtual void | addCssStylePath (const Glib::ustring &path, CFUInt priority) |
void | forall (ForeachSlot slot) |
void | foreach (ForeachSlot slot) |
bool | isContainer () |
判断控件是否为容器。 更多... | |
virtual void | remove (CFWidget &widget) |
![]() | |
void | addEvents (Gdk::EventMask events) |
将 events 位字段添加到控件的事件监听掩码中。 更多... | |
int | getAllocatedHeight () |
返回当前给控件分配的高度。 更多... | |
int | getAllocatedWidth () |
返回当前给控件分配的宽度。 更多... | |
bool | getCanFocus () |
获取控件是否可以拥有输入焦点。 更多... | |
CFAlign | getHalign () |
获取横向对齐方式。 更多... | |
bool | getHasTooltip () |
获取是否使用提示信息。 更多... | |
int | getMarginBottom () |
获取控件的下边距 更多... | |
int | getMarginLeft () |
获取控件的左边距 更多... | |
int | getMarginRight () |
获取控件的右边距 更多... | |
int | getMarginTop () |
获取控件的上边距 更多... | |
bool | getSensitive () |
获取控件可用状态 更多... | |
Glib::ustring | getTooltipMarkup () |
获取当前控件提示信息的内容。 更多... | |
Glib::ustring | getTooltipText () |
获取当前控件提示信息的内容。 更多... | |
CFAlign | getValign () |
获取纵向对齐方式。 更多... | |
bool | getVisible () |
判断本控件是否为可见状态。 更多... | |
void | grabFocus () |
控件获取键盘输入焦点。 更多... | |
bool | hasFocus () |
判断控件是否拥有全局输入焦点。 更多... | |
void | hide () |
隐藏控件 更多... | |
bool | isFocus () |
判断控件是否当前拥有焦点的控件。 更多... | |
bool | isSensitive () |
获取控件及其所在容器控件的可用状态 更多... | |
bool | isVisible () |
判断本控件以及控件所在容器(直到顶层容器)是否为可见状态。 更多... | |
void | queueDraw () |
请求重新描画控件 更多... | |
void | queueDrawArea (int x, int y, int width, int height) |
请求重新描画的指定区域 更多... | |
void | reparent (CFWidget &new_parent) |
将控件从当前的容器中移动到 newParent 指定的容器中。 更多... | |
void | setCanFocus (bool can_focus=true) |
指定控件是否可以获取输入焦点。 更多... | |
void | setEvents (Gdk::EventMask events) |
设置控件的事件监听掩码。 更多... | |
void | setHalign (CFAlign align) |
设置控件横向对齐方式。 更多... | |
void | setHasTooltip (bool has_tooltip=true) |
设置是否使用提示信息。 更多... | |
void | setMarginBottom (int margin) |
设置控件的下边距 更多... | |
void | setMarginLeft (int margin) |
设置控件的左边距 更多... | |
void | setMarginRight (int margin) |
设置控件的右边距 更多... | |
void | setMarginTop (int margin) |
设置控件的上边距 更多... | |
void | setName (const Glib::ustring &name) |
设置控件的名称,以便于使用CSS文件来控制样式。 更多... | |
void | setSensitive (bool sensitive=true) |
设置控件是否可用。 更多... | |
void | setSizeRequest (int width=-1, int height=-1) |
设置控件的最小尺寸。 更多... | |
void | setTooltipMarkup (const Glib::ustring &markup) |
设置提示信息的内容。 更多... | |
void | setTooltipText (const Glib::ustring &text) |
设置提示信息的内容。 更多... | |
void | setValign (CFAlign align) |
设置控件纵向对齐方式。 更多... | |
void | setVisible (bool visible=true) |
设置控件的可见状态。 更多... | |
void | show () |
显示控件。 更多... | |
void | showAll () |
显示控件以及控件所容纳的所有控件(包括所容纳容器控件的所有子控件) 更多... | |
virtual | ~CFWidget () |
析构函数 更多... | |
virtual void | addCssStyleName (const Glib::ustring &name) |
virtual void | addCssStyleFromPath (const Glib::ustring &css_file_path, const Glib::ustring &name, CFUInt priority) |
通过自定义css样式文件路径设置样式 更多... | |
virtual void | listCssStyle () |
查看样式列表 更多... | |
virtual std::vector< Glib::ustring > | getCssStyleVector () |
获取控件样式列表 更多... | |
virtual void | removeCssStyle (const Glib::ustring &name) |
通过样式名移除样式 更多... | |
Glib::RefPtr< Gdk::Window > | getWindow () |
sigc::signal< bool, const ::Cairo::RefPtr< ::Cairo::Context > &> | signalDraw () |
sigc::signal< bool, GdkEvent *> | signalEvent () |
sigc::signal< bool, GdkEventButton *> | signalButtonPressEvent () |
sigc::signal< bool, GdkEventButton *> | signalButtonReleaseEvent () |
sigc::signal< bool, GdkEventAny *> | signalDeleteEvent () |
sigc::signal< bool, GdkEventKey *> | signalKeyPressEvent () |
sigc::signal< bool, GdkEventKey *> | signalKeyReleaseEvent () |
sigc::signal< void > | signalShow () |
![]() | |
void * | getObj () |
获取支持库类实例所绑定的对象实例。 更多... | |
virtual | ~CFObject () |
析构函数。 更多... | |
额外继承的成员函数 | |
![]() | |
typedef sigc::slot< void, CFWidget * > | ForeachSlot |
![]() | |
static CFObject * | getCFObject (void *realObj) |
通过对象实例获取所对应的 CFObject的子类对象实例。 更多... | |
![]() | |
CFBin () | |
构造函数. 更多... | |
![]() | |
void | onApplyCssData (CFWidget *widget) |
void | onApplyCssPath (CFWidget *widget) |
![]() | |
virtual void | onRealObjectInit () |
对象绑定后进行初始化的回调函数。 更多... | |
virtual void | onRealObjectFinalize () |
对象解除绑定前的回调函数。 更多... | |
virtual bool | onDraw (const ::Cairo::RefPtr< ::Cairo::Context > &cr) |
virtual bool | onEvent (GdkEvent *event) |
virtual bool | onButtonPressEvent (GdkEventButton *event) |
virtual bool | onButtonReleaseEvent (GdkEventButton *event) |
virtual bool | onDeleteEvent (GdkEventAny *event) |
virtual bool | onKeyPressEvent (GdkEventKey *event) |
virtual bool | onKeyReleaseEvent (GdkEventKey *event) |
virtual void | onShow () |
CFWidget () | |
![]() | |
CFObject () | |
构造函数 更多... | |
void | setRealObject (void *obj) |
将自身实例与需要使用的对象实例进行绑定。 更多... | |
|
explicit |
Creates a new empty ComboBox, optionally with an entry.
has_entry | If this is true then this will have an Entry widget. |
Glib::ustring CFComboBox::getActiveId | ( | ) |
Returns the ID of the active row of combo_box.
This value is taken from the active row and the column specified by the CFComboBox::property_id_column() property of combo_box (see set_id_column()).
The returned value is an interned string which means that you can compare the pointer by value to other interned strings and that you must not free it.
If the Cdos::CFComboBox::property_id_column() property of combo_box is not set, or if no row is active, or if the active row has a nullptr
ID value, then nullptr
is returned.
nullptr
. void CFComboBox::getActiveId | ( | const Glib::ustring & | active_id | ) |
Changes the active row of combo_box to the one that has an ID equal to active_id, or unsets the active row if active_id is nullptr
.
Rows having a nullptr
ID string cannot be made active by this function.
If the Cdos::CFComboBox::property_id_column() property of combo_box is unset or if no row has the given ID then the function does nothing and returns false
.
active_id | The ID of the row to select, or nullptr . |
true
if a row with a matching ID was found. If a nullptr
active_id was given to unset the active row, the function always returns true
. int CFComboBox::getActiveRowNumber | ( | ) |
Returns the index of the currently active item, or -1 if there’s no active item.
If the model is a non-flat treemodel, and the active item is not an immediate child of the root of the tree, where path
is the CFTreePath of the active item.
bool CFComboBox::getAddTearoffs | ( | ) |
Gets the current title of the menu in tearoff mode.
See setAddTearoffs().
CFSensitivityType CFComboBox::getButtonSensitivity | ( | ) |
Returns whether the combo box sets the dropdown button sensitive or not when there are no items in the model.
int CFComboBox::getColumnSpanColumn | ( | ) |
Returns the column with column span information for combo_box.
CFEntry* CFComboBox::getEntry | ( | ) |
int CFComboBox::getEntryTextColumn | ( | ) |
Returns the column which combo_box is using to get the strings from to display in the internal entry.
bool CFComboBox::getFocusOnClick | ( | ) |
Returns whether the combo box grabs focus when it is clicked with the mouse.
true
if the combo box grabs focus when it is clicked with the mouse. bool CFComboBox::getHasEntry | ( | ) |
Returns whether the combo box has an entry.
int CFComboBox::getIdColumn | ( | ) |
Returns the column which combo_box is using to get string IDs for values from.
bool CFComboBox::getPopupFixedWidth | ( | ) |
Gets whether the popup uses a fixed width matching the allocated width of the combo box.
true
if the popup uses a fixed width. int CFComboBox::getRowSpanColumn | ( | ) |
Returns the column with row span information for combo_box.
Glib::ustring CFComboBox::getTitle | ( | ) |
Gets the current title of the menu in tearoff mode.
int CFComboBox::getWrapWidth | ( | ) |
Returns the wrap width which is used to determine the number of columns for the popup menu.
If the wrap width is larger than 1, the combo box is in table mode.
void CFComboBox::popdown | ( | ) |
Hides the menu or dropdown list of combo_box.
This function is mostly intended for use by accessibility technologies; applications should have little use for it.
void CFComboBox::popup | ( | ) |
Pops up the menu or dropdown list of combo_box.
This function is mostly intended for use by accessibility technologies; applications should have little use for it.
void CFComboBox::popup | ( | const Glib::RefPtr< Gdk::Device > & | device | ) |
Pops up the menu or dropdown list of combo_box, the popup window will be grabbed so only device and its associated pointer/keyboard are the only Gdk::Devices able to send events to it.
device | A Gdk::Device. |
void CFComboBox::setActive | ( | int | index | ) |
Sets the active item of combo_box to be the item at index.
index | An index in the model passed during construction, or -1 to have no active item. |
bool CFComboBox::setActiveId | ( | const Glib::ustring & | active_id | ) |
Changes the active row of the combo box to the one that has an ID equal to active_id.
If property_id_column() is unset or if no row has the given ID then the function does nothing and returns false.
active_id | The ID of the row that should be set to active. |
void CFComboBox::setAddTearoffs | ( | bool | add_tearoffs = true | ) |
Sets whether the popup menu should have a tearoff menu item.
add_tearoffs | true to add tearoff menu items. |
void CFComboBox::setButtonSensitivity | ( | CFSensitivityType | sensitivity | ) |
Sets whether the dropdown button of the combo box should be always sensitive (CFSENSITIVITY_ON), never sensitive (CFSENSITIVITY_OFF) or only if there is at least one item to display (CFSENSITIVITY_AUTO).
sensitivity | Specify the sensitivity of the dropdown button. |
void CFComboBox::setColumnSpanColumn | ( | int | column_span | ) |
Sets the column with column span information for combo_box to be column_span.
The column span column contains integers which indicate how many columns an item should span.
column_span | A column in the model passed during construction. |
void CFComboBox::setEntryTextColumn | ( | int | text_column | ) |
Sets the model column which combo_box should use to get strings from to be text_column.
The column text_column in the model of combo_box must be of type TYPE_STRING.
This is only relevant if combo_box has been created with CFComboBox::property_has_entry() as true
.
text_column | A column in model to get the strings from for the internal entry. |
void CFComboBox::setFocusOnClick | ( | bool | focus_on_click = true | ) |
Sets whether the combo box will grab focus when it is clicked with the mouse.
Making mouse clicks not grab focus is useful in places like toolbars where you don’t want the keyboard focus removed from the main area of the application.
focus_on_click | Whether the combo box grabs focus when clicked with the mouse. |
void CFComboBox::setIdColumn | ( | int | id_column | ) |
Sets the model column which combo_box should use to get string IDs for values from.
The column id_column in the model of combo_box must be of type TYPE_STRING.
id_column | A column in model to get string IDs for values from. |
void CFComboBox::setPopupFixedWidth | ( | bool | fixed = true | ) |
Specifies whether the popup’s width should be a fixed width matching the allocated width of the combo box.
fixed | Whether to use a fixed popup width. |
void CFComboBox::setRowSpanColumn | ( | int | row_span | ) |
Sets the column with row span information for combo_box to be row_span.
The row span column contains integers which indicate how many rows an item should span.
row_span | A column in the model passed during construction. |
void CFComboBox::setTitle | ( | const Glib::ustring & | title | ) |
void CFComboBox::setWrapWidth | ( | int | width | ) |
Sets the wrap width of combo_box to be width.
The wrap width is basically the preferred number of columns when you want the popup to be layed out in a table.
width | Preferred number of columns. |
void CFComboBox::unsetActive | ( | ) |
Causes no item to be active.