Module: Wx::ComboPopup
- Included in:
- ComboPopupWx
- Defined in:
- lib/wx/doc/comboctrl.rb
Overview
In order to use a custom popup with ComboCtrl, a class must include ComboPopup.
For more information on how to use it, see Setting Custom Popup for Wx::ComboCtrl.
Instance Method Summary collapse
-
#create(parent) ⇒ Boolean
The including class must implement this to create the popup control.
-
#destroy_popup ⇒ void
You only need to implement this member function if you create your popup class in non-standard way.
-
#find_item(item, trueItem = false) ⇒ Boolean, String
Implement to customize matching of value string to an item container entry.
-
#get_adjusted_size(minWidth, prefHeight, maxHeight) ⇒ Wx::Size
The including class may implement this to return adjusted size for the popup control, according to the variables given.
-
#get_combo_ctrl ⇒ Wx::ComboCtrl
Returns pointer to the associated parent ComboCtrl.
-
#get_control ⇒ Wx::Window
The including class must implement this to return pointer to the associated control created in #create.
-
#get_string_value ⇒ String
The including class must implement this to return string representation of the value.
-
#init ⇒ void
The including class must implement this to initialize its internal variables.
-
#lazy_create ⇒ Boolean
The including class may implement this to return true if it wants to delay call to #create until the popup is shown for the first time.
-
#on_combo_char_event(event) ⇒ void
The including class may implement this to receive char events from the parent ComboCtrl.
-
#on_combo_double_click ⇒ void
The including class may implement this to do something when the parent ComboCtrl gets double-clicked.
-
#on_combo_key_event(event) ⇒ void
The including class may implement this to receive key down events from the parent ComboCtrl.
-
#on_dismiss ⇒ void
The including class may implement this to do special processing when popup is hidden.
-
#on_popup ⇒ void
The including class may implement this to do special processing when popup is shown.
-
#paint_combo_control(dc, rect) ⇒ void
The including class may implement this to paint the parent ComboCtrl.
-
#set_string_value(value) ⇒ void
The including class must implement this to receive string value changes from ComboCtrl.
Instance Method Details
#create(parent) ⇒ Boolean
The including class must implement this to create the popup control.
true if the call succeeded, false otherwise.
42 |
# File 'lib/wx/doc/comboctrl.rb', line 42 def create(parent) end |
#destroy_popup ⇒ void
This method returns an undefined value.
You only need to implement this member function if you create your popup class in non-standard way.
The default implementation can handle both multiple-inherited popup control (as seen in Wx::ComboCtrl samples) and one allocated separately in heap. If you do completely re-implement this function, make sure it calls Destroy() for the popup control and also deletes this object (usually as the last thing).
49 |
# File 'lib/wx/doc/comboctrl.rb', line 49 def destroy_popup; end |
#find_item(item, trueItem = false) ⇒ Boolean, String
Implement to customize matching of value string to an item container entry.
Default implementation always return true and does not alter trueItem.
61 |
# File 'lib/wx/doc/comboctrl.rb', line 61 def find_item(item, trueItem=false) end |
#get_adjusted_size(minWidth, prefHeight, maxHeight) ⇒ Wx::Size
The including class may implement this to return adjusted size for the popup control, according to the variables given.
This function is called each time popup is about to be shown.
74 |
# File 'lib/wx/doc/comboctrl.rb', line 74 def get_adjusted_size(minWidth, prefHeight, maxHeight) end |
#get_combo_ctrl ⇒ Wx::ComboCtrl
Returns pointer to the associated parent Wx::ComboCtrl.
17 |
# File 'lib/wx/doc/comboctrl.rb', line 17 def get_combo_ctrl; end |
#get_control ⇒ Wx::Window
The including class must implement this to return pointer to the associated control created in #create.
78 |
# File 'lib/wx/doc/comboctrl.rb', line 78 def get_control; end |
#get_string_value ⇒ String
The including class must implement this to return string representation of the value.
87 |
# File 'lib/wx/doc/comboctrl.rb', line 87 def get_string_value; end |
#init ⇒ void
This method returns an undefined value.
The including class must implement this to initialize its internal variables.
This method is called immediately after construction finishes. m_combo member variable has been initialized before the call.
23 |
# File 'lib/wx/doc/comboctrl.rb', line 23 def init; end |
#lazy_create ⇒ Boolean
The including class may implement this to return true if it wants to delay call to #create until the popup is shown for the first time.
It is more efficient, but on the other hand it is often more convenient to have the control created immediately.
Base implementation returns false.
35 |
# File 'lib/wx/doc/comboctrl.rb', line 35 def lazy_create; end |
#on_combo_char_event(event) ⇒ void
This method returns an undefined value.
The including class may implement this to receive char events from the parent Wx::ComboCtrl.
Events not handled should be skipped, as usual.
105 |
# File 'lib/wx/doc/comboctrl.rb', line 105 def on_combo_char_event(event) end |
#on_combo_double_click ⇒ void
This method returns an undefined value.
The including class may implement this to do something when the parent Wx::ComboCtrl gets double-clicked.
91 |
# File 'lib/wx/doc/comboctrl.rb', line 91 def on_combo_double_click; end |
#on_combo_key_event(event) ⇒ void
This method returns an undefined value.
The including class may implement this to receive key down events from the parent Wx::ComboCtrl.
Events not handled should be skipped, as usual.
98 |
# File 'lib/wx/doc/comboctrl.rb', line 98 def on_combo_key_event(event) end |
#on_dismiss ⇒ void
This method returns an undefined value.
The including class may implement this to do special processing when popup is hidden.
109 |
# File 'lib/wx/doc/comboctrl.rb', line 109 def on_dismiss; end |
#on_popup ⇒ void
This method returns an undefined value.
The including class may implement this to do special processing when popup is shown.
113 |
# File 'lib/wx/doc/comboctrl.rb', line 113 def on_popup; end |
#paint_combo_control(dc, rect) ⇒ void
This method returns an undefined value.
The including class may implement this to paint the parent Wx::ComboCtrl. This is called to custom paint in the combo control itself (ie. not the popup).
Default implementation draws value as string.
122 |
# File 'lib/wx/doc/comboctrl.rb', line 122 def paint_combo_control(dc, rect) end |
#set_string_value(value) ⇒ void
This method returns an undefined value.
The including class must implement this to receive string value changes from Wx::ComboCtrl.
83 |
# File 'lib/wx/doc/comboctrl.rb', line 83 def set_string_value(value) end |