Class: Wx::PG::UIntProperty
- Inherits:
-
NumericProperty
- Object
- Object
- PGProperty
- NumericProperty
- Wx::PG::UIntProperty
- Defined in:
- lib/wx/doc/gen/pg/pg_properties.rb
Overview
Basic property with unsigned integer value.
Seamlessly supports 64-bit integer (ULongLong) on overflow. Supported special attributes:
-
PG_UINT_BASE: Define base. Valid constants are PG_BASE_OCT, PG_BASE_DEC, PG_BASE_HEX and PG_BASE_HEXL (lowercase characters). Arbitrary bases are not supported.
-
PG_UINT_PREFIX: Possible values are PG_PREFIX_NONE, PG_PREFIX_0x, and PG_PREFIX_DOLLAR_SIGN. Only PG_PREFIX_NONE works with Decimal and Octal numbers.
-
PG_ATTR_MIN, PG_ATTR_MAX, PG_ATTR_SPINCTRL_STEP, PG_ATTR_SPINCTRL_WRAP, PG_ATTR_SPINCTRL_MOTION: like in NumericProperty.
- For example how to use seamless 64-bit integer support, see IntProperty documentation (just use ULongLong instead of LongLong).
Instance Method Summary collapse
-
#add_spin_step_value(stepScale) ⇒ Wx::Variant
Returns what would be the new value of the property after adding SpinCtrl editor step to the current value.
- #base_ ⇒ Integer
- #base_=(val) ⇒ void
-
#do_get_validator ⇒ Wx::Validator
Returns pointer to the Validator that should be used with the editor of this property (NULL for no validator).
-
#do_set_attribute(name, value) ⇒ Boolean
Reimplement this member function to add special handling for attributes of this property.
-
#initialize(*args) ⇒ UIntProperty
constructor
A new instance of UIntProperty.
-
#int_to_value(variant, number, argFlags = 0) ⇒ Boolean
Converts integer (possibly a choice selection) into Variant value appropriate for this property.
- #max_val_ ⇒ Wx::Variant
- #max_val_=(val) ⇒ void
- #min_val_ ⇒ Wx::Variant
- #min_val_=(val) ⇒ void
- #prefix_ ⇒ Integer
- #prefix_=(val) ⇒ void
- #real_base_ ⇒ Integer
- #real_base_=(val) ⇒ void
- #spin_motion_ ⇒ Boolean
- #spin_motion_=(val) ⇒ void
- #spin_step_ ⇒ Wx::Variant
- #spin_step_=(val) ⇒ void
- #spin_wrap_ ⇒ Boolean
- #spin_wrap_=(val) ⇒ void
-
#string_to_value(variant, text, argFlags = 0) ⇒ Boolean
Converts text into Variant value appropriate for this property.
-
#validate_value(value, validationInfo) ⇒ Boolean
Implement this function in derived class to check the value.
- #value_ ⇒ Wx::Variant
- #value_=(val) ⇒ void
-
#value_to_string(value, argFlags = 0) ⇒ String
Converts property value into a text representation.
Methods inherited from NumericProperty
Methods inherited from PGProperty
#adapt_list_to_value, #add_choice, #add_private_child, #append_child, #are_all_children_specified, #are_children_components, #change_flag, #child_changed, #clear_cells, #delete_children, #delete_choice, #do_get_attribute, #do_get_editor_class, #do_get_value, #each_attribute, #empty, #enable, #enable_common_value, #ensure_cells, #generate_composed_value, #get_attribute, #get_attribute_as_double, #get_attribute_as_long, #get_attributes, #get_attributes_as_list, #get_base_name, #get_cell, #get_cell_or_default, #get_child_count, #get_children_height, #get_choice_selection, #get_choices, #get_client_object, #get_column_editor, #get_common_value, #get_default_value, #get_depth, #get_displayed_common_value_count, #get_displayed_string, #get_editor_class, #get_editor_dialog, #get_flags_as_string, #get_grid, #get_grid_if_displayed, #get_help_string, #get_hint_text, #get_image_offset, #get_index_in_parent, #get_item_at_y, #get_label, #get_last_visible_sub_item, #get_main_parent, #get_max_length, #get_name, #get_parent, #get_property_by_name, #get_property_by_name_wh, #get_validator, #get_value, #get_value_as_string, #get_value_image, #get_value_type, #get_y, #has_flag, #has_flags_exact, #has_visible_children, #hide, #index, #insert_child, #insert_choice, #is_category, #is_child_selected, #is_enabled, #is_expanded, #is_root, #is_some_parent, #is_sub_property, #is_text_editable, #is_value_unspecified, #is_visible, #item, #last, #on_custom_paint, #on_event, #on_measure_image, #on_set_value, #on_validation_failure, #recreate_editor, #refresh_children, #refresh_editor, #set_attribute, #set_attributes, #set_auto_unspecified, #set_background_colour, #set_cell, #set_choice_selection, #set_choices, #set_client_object, #set_common_value, #set_default_colours, #set_default_value, #set_editor, #set_expanded, #set_flag_recursively, #set_flags_from_string, #set_help_string, #set_label, #set_max_length, #set_modified_status, #set_name, #set_parental_type, #set_text_colour, #set_validator, #set_value, #set_value_from_int, #set_value_from_string, #set_value_image, #set_value_in_event, #set_value_to_unspecified, #set_was_modified, #update_parent_values, #uses_auto_unspecified
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize(label = Wx::PG::PG_LABEL, name = Wx::PG::PG_LABEL, value = 0) ⇒ Wx::PG::UIntProperty #initialize(label, name, value) ⇒ Wx::PG::UIntProperty
Returns a new instance of UIntProperty.
1991 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 1991 def initialize(*args) end |
Instance Method Details
#add_spin_step_value(stepScale) ⇒ Wx::Variant
Returns what would be the new value of the property after adding SpinCtrl editor step to the current value.
Current value range and wrapping (if enabled) are taken into account. This member has to be implemented in derived properties.
Value which property would have after adding SpinCtrl editor step.
Current property value is not changed.
2120 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2120 def add_spin_step_value(stepScale) end |
#base_ ⇒ Integer
2126 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2126 def base_; end |
#base_=(val) ⇒ void
This method returns an undefined value.
2132 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2132 def base_=(val); end |
#do_get_validator ⇒ Wx::Validator
Returns pointer to the Validator that should be used with the editor of this property (NULL for no validator).
Setting validator explicitly via #set_property_validator will override this. In most situations, code like this should work well:
class MyPropertyClass < Wx::PG::UIntProperty
class << self
def validator
@validator ||= MyValidator.new(...)
end
end
# ...
def do_get_validator
MyPropertyClass.validator
end
# ...
end
You can get common filename validator by returning FileProperty.get_class_validator. DirProperty, for example, uses it.
2084 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2084 def do_get_validator; end |
#do_set_attribute(name, value) ⇒ Boolean
Reimplement this member function to add special handling for attributes of this property.
Return false to have the attribute automatically stored in m_attributes. Default implementation simply does that and nothing else.
To actually set property attribute values from the application, use PGProperty#set_attribute instead.
2034 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2034 def do_set_attribute(name, value) end |
#int_to_value(variant, number, argFlags = 0) ⇒ Boolean
Converts integer (possibly a choice selection) into Variant value appropriate for this property.
Returns true if resulting Variant value was different.
- If property is not supposed to use choice or spinctrl or other editor with int-based value, it is not necessary to implement this method. - Default implementation simply assign given int to m_value. - If property uses choice control, and displays a dialog on some choice items, then it is preferred to display that dialog in IntToValue instead of OnEvent. - You might want to take into account that m_value is Mull variant if property value is unspecified (which is usually only case if you explicitly enabled that sort behaviour).
2105 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2105 def int_to_value(variant, number, argFlags=0) end |
#max_val_ ⇒ Wx::Variant
2176 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2176 def max_val_; end |
#max_val_=(val) ⇒ void
This method returns an undefined value.
2180 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2180 def max_val_=(val); end |
#min_val_ ⇒ Wx::Variant
2168 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2168 def min_val_; end |
#min_val_=(val) ⇒ void
This method returns an undefined value.
2172 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2172 def min_val_=(val); end |
#prefix_ ⇒ Integer
2150 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2150 def prefix_; end |
#prefix_=(val) ⇒ void
This method returns an undefined value.
2156 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2156 def prefix_=(val); end |
#real_base_ ⇒ Integer
2138 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2138 def real_base_; end |
#real_base_=(val) ⇒ void
This method returns an undefined value.
2144 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2144 def real_base_=(val); end |
#spin_motion_ ⇒ Boolean
2184 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2184 def spin_motion_; end |
#spin_motion_=(val) ⇒ void
This method returns an undefined value.
2188 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2188 def spin_motion_=(val); end |
#spin_step_ ⇒ Wx::Variant
2192 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2192 def spin_step_; end |
#spin_step_=(val) ⇒ void
This method returns an undefined value.
2196 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2196 def spin_step_=(val); end |
#spin_wrap_ ⇒ Boolean
2200 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2200 def spin_wrap_; end |
#spin_wrap_=(val) ⇒ void
This method returns an undefined value.
2204 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2204 def spin_wrap_=(val); end |
#string_to_value(variant, text, argFlags = 0) ⇒ Boolean
Converts text into Variant value appropriate for this property.
Returns true if resulting Variant value was different.
Default implementation converts semicolon delimited tokens into child values. Only works for properties with children.
You might want to take into account that m_value is Null variant if property value is unspecified (which is usually only case if you explicitly enabled that sort behaviour).
2020 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2020 def string_to_value(variant, text, argFlags=0) end |
#validate_value(value, validationInfo) ⇒ Boolean
Implement this function in derived class to check the value.
Return true if it is ok. Returning false prevents property change events from occurring.
- Default implementation always returns true.
2051 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2051 def validate_value(value, validationInfo) end |
#value_=(val) ⇒ void
This method returns an undefined value.
2164 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2164 def value_=(val); end |
#value_to_string(value, argFlags = 0) ⇒ String
Converts property value into a text representation.
Default implementation calls PGProperty#generate_composed_value.
2003 |
# File 'lib/wx/doc/gen/pg/pg_properties.rb', line 2003 def value_to_string(value, argFlags=0) end |