Class: Wx::HeaderColumn
- Inherits:
-
Object
- Object
- Wx::HeaderColumn
- Defined in:
- lib/wx/doc/gen/header_ctrl.rb
Overview
Represents a column header in controls displaying tabular data such as DataViewCtrl or GRID::Grid.
Notice that this is an abstract base class which is implemented (usually using the information stored in the associated control) by the different controls using HeaderCtrl. As the control only needs to retrieve the information about the column, this class defines only the methods for accessing the various column properties but not for changing them as the setters might not be needed at all, e.g. if the column attributes can only be changed via the methods of the main associated control (this is the case for GRID::Grid for example). If you do want to allow changing them directly using the column itself, you should inherit from SettableHeaderColumn instead of this class. Finally, if you don’t already store the column information at all anywhere, you should use the concrete HeaderColumnSimple class and HeaderCtrlSimple.
Category: Controls
Direct Known Subclasses
Instance Method Summary collapse
-
#get_alignment ⇒ Wx::Alignment
(also: #alignment)
Returns the current column alignment.
-
#get_bitmap ⇒ Wx::Bitmap
(also: #bitmap)
This function exists only for backwards compatibility, it’s recommended to override #get_bitmap_bundle in the new code and override this one to do nothing, as it will never be called if #get_bitmap_bundle is overridden.
-
#get_bitmap_bundle ⇒ Wx::BitmapBundle
(also: #bitmap_bundle)
Returns the bitmap in the header of the column, if any.
-
#get_flags ⇒ Integer
(also: #flags)
Get the column flags.
-
#get_min_width ⇒ Integer
(also: #min_width)
Return the minimal column width.
-
#get_title ⇒ String
(also: #title)
Get the text shown in the column header.
-
#get_width ⇒ Integer
(also: #width)
Returns the current width of the column.
-
#has_flag(flag) ⇒ Boolean
(also: #has_flag?)
Return true if the specified flag is currently set for this column.
-
#is_hidden ⇒ Boolean
(also: #hidden?)
Returns true if the column is currently hidden.
-
#is_reorderable ⇒ Boolean
(also: #reorderable?)
Returns true if the column can be dragged by user to change its order.
-
#is_resizeable ⇒ Boolean
(also: #resizeable?)
Return true if the column can be resized by the user.
-
#is_shown ⇒ Boolean
(also: #shown?)
Returns true if the column is currently shown.
-
#is_sort_key ⇒ Boolean
(also: #sort_key?)
Returns true if the column is currently used for sorting.
-
#is_sort_order_ascending ⇒ Boolean
(also: #sort_order_ascending?)
Returns true, if the sort order is ascending.
-
#is_sortable ⇒ Boolean
(also: #sortable?)
Returns true if the column can be clicked by user to sort the control contents by the field in this column.
Instance Method Details
#get_alignment ⇒ Wx::Alignment Also known as: alignment
Returns the current column alignment.
One of Alignment::ALIGN_CENTRE, Alignment::ALIGN_LEFT or Alignment::ALIGN_RIGHT.
412 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 412 def get_alignment; end |
#get_bitmap ⇒ Wx::Bitmap Also known as: bitmap
This function exists only for backwards compatibility, it’s recommended to override #get_bitmap_bundle in the new code and override this one to do nothing, as it will never be called if #get_bitmap_bundle is overridden.
383 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 383 def get_bitmap; end |
#get_bitmap_bundle ⇒ Wx::BitmapBundle Also known as: bitmap_bundle
Returns the bitmap in the header of the column, if any.
If the column has no associated bitmap, empty BitmapBundle should be returned. Override this function to return the bundle containing the bitmap to show in the column header. By default delegates to #get_bitmap but should be overridden if the bitmaps are used.
391 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 391 def get_bitmap_bundle; end |
#get_flags ⇒ Integer Also known as: flags
Get the column flags.
This method retrieves all the flags at once, you can also use #has_flag to test for any individual flag or #is_resizeable, #is_sortable, #is_reorderable and #is_hidden to test for particular flags.
419 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 419 def get_flags; end |
#get_min_width ⇒ Integer Also known as: min_width
Return the minimal column width.
The minimal width such that the user can’t resize the column to lesser size (notice that it is still possible to set the column width to smaller value from the program code). Return 0 from here to allow resizing the column to arbitrarily small size.
405 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 405 def get_min_width; end |
#get_title ⇒ String Also known as: title
Get the text shown in the column header.
378 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 378 def get_title; end |
#get_width ⇒ Integer Also known as: width
Returns the current width of the column.
Width of the column in pixels, never COL_WIDTH_DEFAULT or COL_WIDTH_AUTOSIZE.
398 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 398 def get_width; end |
#has_flag(flag) ⇒ Boolean Also known as: has_flag?
Return true if the specified flag is currently set for this column.
425 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 425 def has_flag(flag) end |
#is_hidden ⇒ Boolean Also known as:
Returns true if the column is currently hidden.
This corresponds to COL_HIDDEN flag which is off by default.
453 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 453 def is_hidden; end |
#is_reorderable ⇒ Boolean Also known as: reorderable?
Returns true if the column can be dragged by user to change its order.
This corresponds to COL_REORDERABLE flag which is on by default.
446 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 446 def is_reorderable; end |
#is_resizeable ⇒ Boolean Also known as: resizeable?
Return true if the column can be resized by the user.
Equivalent to HasFlag(COL_RESIZABLE).
432 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 432 def is_resizeable; end |
#is_shown ⇒ Boolean Also known as: shown?
Returns true if the column is currently shown.
This corresponds to the absence of COL_HIDDEN flag.
460 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 460 def is_shown; end |
#is_sort_key ⇒ Boolean Also known as: sort_key?
Returns true if the column is currently used for sorting.
465 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 465 def is_sort_key; end |
#is_sort_order_ascending ⇒ Boolean Also known as: sort_order_ascending?
Returns true, if the sort order is ascending.
Notice that it only makes sense to call this function if the column is used for sorting at all, i.e. if #is_sort_key returns true.
472 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 472 def is_sort_order_ascending; end |
#is_sortable ⇒ Boolean Also known as: sortable?
Returns true if the column can be clicked by user to sort the control contents by the field in this column.
This corresponds to COL_SORTABLE flag which is off by default.
439 |
# File 'lib/wx/doc/gen/header_ctrl.rb', line 439 def is_sortable; end |