Class: Wx::PG::PGChoices
- Inherits:
-
Object
- Object
- Wx::PG::PGChoices
- Defined in:
- lib/wx/doc/gen/pg/pg_property.rb,
lib/wx/doc/pg/pg_property.rb
Overview
This class is untracked and should not be derived from nor instances extended!
Helper class for managing choices of PropertyGrid properties.
Each entry can have label, value, bitmap, text colour, and background colour. PGChoices uses reference counting, similar to other wxWidgets classes. This means that assignment operator and copy constructor only copy the reference and not the actual data. Use #copy member function to create a real copy.
If you do not specify value for entry, index is used.
Category: PropertyGrid
Instance Method Summary collapse
- #[](*args) ⇒ Object
- #add(*args) ⇒ Object
-
#add_as_sorted(label, value = Wx::PG::PG_INVALID_VALUE) ⇒ Wx::PG::PGChoiceEntry
Adds a single item, sorted.
-
#alloc_exclusive ⇒ void
Creates exclusive copy of current choices.
-
#assign(a) ⇒ void
Assigns choices data, using reference counting.
-
#clear ⇒ void
Deletes all items.
-
#copy ⇒ Wx::PG::PGChoices
Returns a real copy of the choices.
-
#each_entry {|entry| ... } ⇒ Object, Enumerator
Iterate each choice entry.
-
#each_label {|label| ... } ⇒ Object, Enumerator
Iterate each label.
- #ensure_data ⇒ void
-
#get_count ⇒ Integer
(also: #count)
Returns number of items.
-
#get_indices_for_strings(strings, unmatched = nil) ⇒ Array<Integer>
(also: #indices_for_strings)
Returns array of indices matching given strings.
-
#get_label(ind) ⇒ Wx::String
(also: #label)
Returns label of item.
-
#get_labels ⇒ Array<String>
(also: #labels)
Returns array of choice labels.
-
#get_value(ind) ⇒ Integer
(also: #value)
Returns value of item.
-
#get_values_for_strings(strings) ⇒ Array<Integer>
(also: #values_for_strings)
Returns array of values matching the given strings.
- #index(*args) ⇒ Object
-
#initialize(*args) ⇒ PGChoices
constructor
A new instance of PGChoices.
- #insert(*args) ⇒ Object
-
#is_ok ⇒ Boolean
(also: #ok?)
Returns false if this is a constant empty set of choices, which should not be modified.
-
#item(i) ⇒ Wx::PG::PGChoiceEntry
Returns item at given index.
-
#remove_at(nIndex, count = 1) ⇒ void
Removes count items starting at position nIndex.
-
#set(labels, values = (Wx::ArrayInt.new())) ⇒ void
This is an overloaded member function, provided for convenience.
Constructor Details
#initialize ⇒ Wx::PG::PGChoices #initialize(a) ⇒ Wx::PG::PGChoices #initialize(labels, values = (Wx::ArrayInt.new())) ⇒ Wx::PG::PGChoices
Returns a new instance of PGChoices.
1883 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1883 def initialize(*args) end |
Instance Method Details
#[](i) ⇒ Wx::PG::PGChoiceEntry #[](i) ⇒ Wx::PG::PGChoiceEntry
2025 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 2025 def [](*args) end |
#add(arr, arrint) ⇒ void #add(label, value = Wx::PG::PG_INVALID_VALUE) ⇒ Wx::PG::PGChoiceEntry #add(label, bitmap, value = Wx::PG::PG_INVALID_VALUE) ⇒ Wx::PG::PGChoiceEntry #add(entry) ⇒ Wx::PG::PGChoiceEntry
1905 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1905 def add(*args) end |
#add_as_sorted(label, value = Wx::PG::PG_INVALID_VALUE) ⇒ Wx::PG::PGChoiceEntry
Adds a single item, sorted.
1911 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1911 def add_as_sorted(label, value=Wx::PG::PG_INVALID_VALUE) end |
#alloc_exclusive ⇒ void
This method returns an undefined value.
Creates exclusive copy of current choices.
2012 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 2012 def alloc_exclusive; end |
#assign(a) ⇒ void
This method returns an undefined value.
Assigns choices data, using reference counting.
To create a real copy, use #copy member function instead.
1918 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1918 def assign(a) end |
#clear ⇒ void
This method returns an undefined value.
Deletes all items.
1922 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1922 def clear; end |
#copy ⇒ Wx::PG::PGChoices
Returns a real copy of the choices.
1926 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1926 def copy; end |
#each_entry {|entry| ... } ⇒ Object, Enumerator
Iterate each choice entry. Passes each choice entry to the given block. Returns an Enumerator if no block given.
39 |
# File 'lib/wx/doc/pg/pg_property.rb', line 39 def each_entry; end |
#each_label {|label| ... } ⇒ Object, Enumerator
Iterate each label. Passes each label string to the given block. Returns an Enumerator if no block given.
32 |
# File 'lib/wx/doc/pg/pg_property.rb', line 32 def each_label; end |
#ensure_data ⇒ void
This method returns an undefined value.
1929 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1929 def ensure_data; end |
#get_count ⇒ Integer Also known as: count
Returns number of items.
1939 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1939 def get_count; end |
#get_indices_for_strings(strings, unmatched = nil) ⇒ Array<Integer> Also known as: indices_for_strings
Returns array of indices matching given strings.
Unmatching strings are added to ‘unmatched’, if not NULL.
1962 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1962 def get_indices_for_strings(strings, unmatched=nil) end |
#get_label(ind) ⇒ Wx::String Also known as: label
Returns label of item.
1934 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1934 def get_label(ind) end |
#get_labels ⇒ Array<String> Also known as: labels
Returns array of choice labels.
2016 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 2016 def get_labels; end |
#get_value(ind) ⇒ Integer Also known as: value
Returns value of item.
1945 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1945 def get_value(ind) end |
#get_values_for_strings(strings) ⇒ Array<Integer> Also known as: values_for_strings
Returns array of values matching the given strings.
Unmatching strings result in Wx::PG::PG_INVALID_VALUE entry in array.
1953 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1953 def get_values_for_strings(strings) end |
#index(label) ⇒ Integer #index(val) ⇒ Integer
1973 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1973 def index(*args) end |
#insert(label, index, value = Wx::PG::PG_INVALID_VALUE) ⇒ Wx::PG::PGChoiceEntry #insert(entry, index) ⇒ Wx::PG::PGChoiceEntry
1986 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1986 def insert(*args) end |
#is_ok ⇒ Boolean Also known as: ok?
Returns false if this is a constant empty set of choices, which should not be modified.
1990 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1990 def is_ok; end |
#item(i) ⇒ Wx::PG::PGChoiceEntry
Returns item at given index.
1996 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 1996 def item(i) end |
#remove_at(nIndex, count = 1) ⇒ void
This method returns an undefined value.
Removes count items starting at position nIndex.
2002 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 2002 def remove_at(nIndex, count=1) end |
#set(labels, values = (Wx::ArrayInt.new())) ⇒ void
This method returns an undefined value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
2008 |
# File 'lib/wx/doc/gen/pg/pg_property.rb', line 2008 def set(labels, values=(Wx::ArrayInt.new())) end |