# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation
# generator. Do not alter this file.
# :startdoc:
module Wx::PG
# {Wx::PG::PropertyGrid} is a specialized grid for editing properties - in other words name = value pairs.
#
# List of ready-to-use property classes include strings, numbers, flag sets, fonts, colours and many others. It is possible, for example, to categorize properties, set up a complete tree-hierarchy, add more than two columns, and set arbitrary per-property attributes.
# Please note that most member functions are inherited and as such not documented on this page. This means you will probably also want to read {Wx::PG::PropertyGridInterface} class reference.
# See also wxPropertyGrid Overview.
#
# ## Window Styles
#
# See wxPropertyGrid Window Styles.
#
# ## Event Handling
#
# Please see {Wx::PG::PropertyGridEvent} for the documentation of all event types you can use with {Wx::PG::PropertyGrid}.
#
#
#
# Category: {Wx::PG::PropertyGrid} Appearance: WXMSW Appearance
# | WXGTK Appearance
# | WXOSX Appearance
# |
#
# @wxrb_require USE_PROPGRID
class PropertyGrid < ScrolledControl
include Wx::PG::PropertyGridInterface
# Override in derived class to display error messages in custom manner (these message usually only result from validation failure).
#
#
# @see Wx::PG::PropertyGrid#do_hide_property_error
# @param property [Wx::PG::PGProperty]
# @param msg [String]
# @return [void]
def do_show_property_error(property, msg) end
# Override in derived class to hide an error displayed by {Wx::PG::PropertyGrid#do_show_property_error}.
#
#
# @see Wx::PG::PropertyGrid#do_show_property_error
# @param property [Wx::PG::PGProperty]
# @return [void]
def do_hide_property_error(property) end
# Return {Wx::StatusBar} that is used by this {Wx::PG::PropertyGrid}.
#
# You can reimplement this member function in derived class to override the default behaviour of using the top-level {Wx::Frame}'s status bar, if any.
# @return [Wx::StatusBar]
def get_status_bar; end
alias_method :status_bar, :get_status_bar
# Override to customize property validation failure behaviour.
#
# Return true if user is allowed to change to another property even if current has invalid value.
# @param property [Wx::PG::PGProperty] Property with entered an invalid value
# @param invalidValue [Wx::Variant] Value which failed in validation.
# @return [Boolean]
def do_on_validation_failure(property, invalidValue) end
# Override to customize resetting of property validation failure status.
#
#
# @param property [Wx::PG::PGProperty]
# @return [void]
def do_on_validation_failure_reset(property) end
# Call when editor widget's contents is modified.
#
# For example, this is called when changes text in {Wx::TextCtrl} (used in {Wx::PG::StringProperty} and {Wx::PG::IntProperty}).
#
#
# @see Wx::PG::PGProperty#on_event
# @return [void]
def editors_value_was_modified; end
# Reverse of {Wx::PG::PropertyGrid#editors_value_was_modified}.
#
#
# @return [void]
def editors_value_was_not_modified; end
# Returns most up-to-date value of selected property.
#
# This will return value different from {Wx::PG::PropertyGrid#get_selected_property}->GetValue() only when text editor is activate and string edited by user represents valid, uncommitted property value.
# @return [Wx::Variant]
def get_uncommitted_property_value; end
alias_method :uncommitted_property_value, :get_uncommitted_property_value
# Returns true if editor's value was marked modified.
# @return [Boolean]
def is_editors_value_modified; end
alias_method :editors_value_modified?, :is_editors_value_modified
# Shows a brief error message that is related to a property.
# @param id [String,Wx::PG::PGProperty]
# @param msg [String]
# @return [void]
def show_property_error(id, msg) end
# Call this from {Wx::PG::PGProperty#on_event} to cause property value to be changed after the function returns (with true as return value).
#
# {Wx::PG::PropertyGrid#value_change_in_event} must be used if you wish the application to be able to use {Wx::PG::EVT_PG_CHANGING} to potentially veto the given value.
# @param variant [nil,String,Integer,Float,Time,Wx::Font,Wx::Colour,Wx::Variant,Array,Array,ObjectWx::PG::ColourPropertyValue]
# @return [void]
def value_change_in_event(variant) end
# You can use this member function, for instance, to detect in {Wx::PG::PGProperty#on_event} if {Wx::PG::PGProperty#set_value_in_event} was already called in {Wx::PG::PGEditor#on_event}.
#
# It really only detects if was value was changed using {Wx::PG::PGProperty#set_value_in_event}, which is usually used when a 'picker' dialog is displayed. If value was written by "normal means" in {Wx::PG::PGProperty#string_to_value} or IntToValue(), then this function will return false (on the other hand, {Wx::PG::PGProperty#on_event} is not even called in those cases).
# @return [Boolean]
def was_value_changed_in_event; end
# @overload initialize()
# Two step constructor.
#
# Call {Wx::PG::PropertyGrid#create} when this constructor is called to build up the {Wx::PG::PropertyGrid}
# @return [Wx::PG::PropertyGrid]
# @overload initialize(parent, id=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::PG::PG_DEFAULT_STYLE, name=Wx::PROPERTY_GRID_NAME_STR)
# Constructor.
#
# The styles to be used are styles valid for the {Wx::Window}.
# @see wxPropertyGrid Window Styles.
# @param parent [Wx::Window]
# @param id [Integer]
# @param pos [Array(Integer, Integer), Wx::Point]
# @param size [Array(Integer, Integer), Wx::Size]
# @param style [Integer]
# @param name [String]
# @return [Wx::PG::PropertyGrid]
def initialize(*args) end
# Adds given key combination to trigger given action.
#
# Here is a sample code to make Enter key press move focus to the next property.
#
# ```ruby
# propGrid.add_action_trigger(Wx::PG::PG_ACTION_NEXT_PROPERTY, Wx::K_RETURN)
# propGrid.dedicate_key(Wx::K_RETURN)
# ```
# @param action [Integer] Which action to trigger. See wxPropertyGrid Action Identifiers.
# @param keycode [Integer] Which keycode triggers the action.
# @param modifiers [Integer] Which key event modifiers, in addition to keycode, are needed to trigger the action.
# @return [void]
def add_action_trigger(action, keycode, modifiers=0) end
# Adds given property into selection.
#
# If {Wx::PG::PG_EX_WINDOW_STYLES::PG_EX_MULTIPLE_SELECTION} extra style is not used, then this has same effect as calling {Wx::PG::PropertyGrid#select_property}.
#
#
# @param id [String,Wx::PG::PGProperty]
# @return [Boolean]
def add_to_selection(id) end
# Creates label editor {Wx::TextCtrl} for given column, for property that is currently selected.
#
# When multiple selection is enabled, this applies to whatever property {Wx::PG::PropertyGrid#get_selection} returns.
# @see Wx::PG::PropertyGrid#end_label_edit
# @see Wx::PG::PropertyGrid#make_column_editable
# @param colIndex [Integer] Which column's label to edit. Note that you should not use value 1, which is reserved for property value column.
# @return [void]
def begin_label_edit(colIndex=0) end
# Changes value of a property, as if from an editor.
#
# Use this instead of {Wx::PG::PropertyGrid#set_property_value} if you need the value to run through validation process, and also send {Wx::PG::EVT_PG_CHANGED}.
#
#
#
# Returns true if value was successfully changed.
# @param id [String,Wx::PG::PGProperty]
# @param newValue [nil,String,Integer,Float,Time,Wx::Font,Wx::Colour,Wx::Variant,Array,Array,ObjectWx::PG::ColourPropertyValue]
# @return [Boolean]
def change_property_value(id, newValue) end
# Centers the splitter.
# @param enableAutoResizing [Boolean] If true, automatic column resizing is enabled (only applicable if window style {Wx::PG::PG_WINDOW_STYLES::PG_SPLITTER_AUTO_CENTER} is used).
# @return [void]
def center_splitter(enableAutoResizing=false) end
# Deletes all properties.
# @return [void]
def clear; end
# Clears action triggers for given action.
# @param action [Integer] Which action to trigger. wxPropertyGrid Action Identifiers.
# @return [void]
def clear_action_triggers(action) end
# Forces updating the value of property from the editor control.
#
# Note that {Wx::PG::EVT_PG_CHANGING} and {Wx::PG::EVT_PG_CHANGED} are dispatched using ProcessEvent, meaning your event handlers will be called immediately.
# Returns true if anything was changed.
# @param flags [Integer]
# @return [Boolean]
def commit_changes_from_editor(flags=0) end
# Two step creation.
#
# Whenever the control is created without any parameters, use Create to actually create it. Don't access the control's public methods before this is called
# @see wxPropertyGrid Window Styles.
# @param parent [Wx::Window]
# @param id [Integer]
# @param pos [Array(Integer, Integer), Wx::Point]
# @param size [Array(Integer, Integer), Wx::Size]
# @param style [Integer]
# @param name [String]
# @return [Boolean]
def create(parent, id=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::PG::PG_DEFAULT_STYLE, name=Wx::PROPERTY_GRID_NAME_STR) end
# Dedicates a specific keycode to {Wx::PG::PropertyGrid}.
#
# This means that such key presses will not be redirected to editor controls.
# Using this function allows, for example, navigation between properties using arrow keys even when the focus is in the editor control.
# @param keycode [Integer]
# @return [void]
def dedicate_key(keycode) end
# Enables or disables (shows/hides) categories according to parameter enable.
#
#
# @param enable [Boolean]
# @return [Boolean]
def enable_categories(enable) end
# Destroys label editor {Wx::TextCtrl}, if any.
#
#
# @see Wx::PG::PropertyGrid#begin_label_edit
# @see Wx::PG::PropertyGrid#make_column_editable
# @param commit [Boolean] Use true (default) to store edited label text in property cell data.
# @return [void]
def end_label_edit(commit=true) end
# Scrolls and/or expands items to ensure that the given item is visible.
#
# Returns true if something was actually done.
# @param id [String,Wx::PG::PGProperty]
# @return [Boolean]
def ensure_visible(id) end
# Reduces column sizes to minimum possible, while still retaining fully visible grid contents (labels, images).
#
# Minimum size for the grid to still display everything.
#
#
# @return [Wx::Size]
def fit_columns; end
# Returns currently active label editor, NULL if none.
# @return [Wx::TextCtrl]
def get_label_editor; end
alias_method :label_editor, :get_label_editor
# Returns {Wx::Window} that the properties are painted on, and which should be used as the parent for editor controls.
# @return [Wx::Window]
def get_panel; end
alias_method :panel, :get_panel
# Returns current category caption background colour.
# @return [Wx::Colour]
def get_caption_background_colour; end
alias_method :caption_background_colour, :get_caption_background_colour
# Returns current category caption font.
# @return [Wx::Font]
def get_caption_font; end
alias_method :caption_font, :get_caption_font
# Returns current category caption text colour.
# @return [Wx::Colour]
def get_caption_foreground_colour; end
alias_method :caption_foreground_colour, :get_caption_foreground_colour
# Returns current cell background colour.
# @return [Wx::Colour]
def get_cell_background_colour; end
alias_method :cell_background_colour, :get_cell_background_colour
# Returns current cell text colour when disabled.
# @return [Wx::Colour]
def get_cell_disabled_text_colour; end
alias_method :cell_disabled_text_colour, :get_cell_disabled_text_colour
# Returns current cell text colour.
# @return [Wx::Colour]
def get_cell_text_colour; end
alias_method :cell_text_colour, :get_cell_text_colour
# Returns number of columns currently on grid.
# @return [Integer]
def get_column_count; end
alias_method :column_count, :get_column_count
# Returns colour of empty space below properties.
# @return [Wx::Colour]
def get_empty_space_colour; end
alias_method :empty_space_colour, :get_empty_space_colour
# Returns height of highest characters of used font.
# @return [Integer]
def get_font_height; end
alias_method :font_height, :get_font_height
# Returns pointer to itself.
#
# Dummy function that enables same kind of code to use {Wx::PG::PropertyGrid} and {Wx::PG::PropertyGridManager}.
# @return [Wx::PG::PropertyGrid]
def get_grid; end
alias_method :grid, :get_grid
# Returns rectangle of custom paint image.
# @param property [Wx::PG::PGProperty] Return image rectangle for this property.
# @param item [Integer] Which choice of property to use (each choice may have different image).
# @return [Wx::Rect]
def get_image_rect(property, item) end
alias_method :image_rect, :get_image_rect
# Returns size of the custom paint image in front of property.
# @param property [Wx::PG::PGProperty] Return image rectangle for this property. If this argument is NULL, then preferred size is returned.
# @param item [Integer] Which choice of property to use (each choice may have different image).
# @return [Wx::Size]
def get_image_size(property=nil, item=-1) end
alias_method :image_size, :get_image_size
# Returns last item which could be iterated using given flags.
# @param flags [Integer] See wxPropertyGridIterator Flags.
# @return [Wx::PG::PGProperty]
def get_last_item(flags=Wx::PG::PG_ITERATOR_FLAGS::PG_ITERATE_DEFAULT) end
alias_method :last_item, :get_last_item
# Returns colour of lines between cells.
# @return [Wx::Colour]
def get_line_colour; end
alias_method :line_colour, :get_line_colour
# Returns background colour of margin.
# @return [Wx::Colour]
def get_margin_colour; end
alias_method :margin_colour, :get_margin_colour
# Returns margin width.
# @return [Integer]
def get_margin_width; end
alias_method :margin_width, :get_margin_width
# Returns "root property".
#
# It does not have name, etc. and it is not visible. It is only useful for accessing its children.
# @return [Wx::PG::PGProperty]
def get_root; end
alias_method :root, :get_root
# Returns height of a single grid row (in pixels).
# @return [Integer]
def get_row_height; end
alias_method :row_height, :get_row_height
# Returns currently selected property.
# @return [Wx::PG::PGProperty]
def get_selected_property; end
alias_method :selected_property, :get_selected_property
# Returns currently selected property.
# @return [Wx::PG::PGProperty]
def get_selection; end
alias_method :selection, :get_selection
# Returns current selection background colour.
# @return [Wx::Colour]
def get_selection_background_colour; end
alias_method :selection_background_colour, :get_selection_background_colour
# Returns current selection text colour.
# @return [Wx::Colour]
def get_selection_foreground_colour; end
alias_method :selection_foreground_colour, :get_selection_foreground_colour
# Returns current splitter x position.
# @param splitterIndex [Integer]
# @return [Integer]
def get_splitter_position(splitterIndex=0) end
alias_method :splitter_position, :get_splitter_position
# Returns {Wx::TextCtrl} active in currently selected property, if any.
#
# Takes {Wx::OwnerDrawnComboBox} into account.
# @return [Wx::TextCtrl]
def get_editor_text_ctrl; end
alias_method :editor_text_ctrl, :get_editor_text_ctrl
# Returns current appearance of unspecified value cells.
#
#
# @see Wx::PG::PropertyGrid#set_unspecified_value_appearance
# @return [Wx::PG::PGCell]
def get_unspecified_value_appearance; end
alias_method :unspecified_value_appearance, :get_unspecified_value_appearance
# Returns (visual) text representation of the unspecified property value.
# @param argFlags [Integer] For internal use only.
# @return [String]
def get_unspecified_value_text(argFlags=0) end
alias_method :unspecified_value_text, :get_unspecified_value_text
# Returns current vertical spacing.
# @return [Integer]
def get_vertical_spacing; end
alias_method :vertical_spacing, :get_vertical_spacing
# Returns information about arbitrary position in the grid.
# @param pt [Array(Integer, Integer), Wx::Point] Coordinates in the virtual grid space. You may need to use Wx::Scrolled#calc_scrolled_position for translating {Wx::PG::PropertyGrid} client coordinates into something this member function can use.
# @return [Wx::PG::PropertyGridHitTestResult]
def hit_test(pt) end
# Returns true if any property has been modified by the user.
# @return [Boolean]
def is_any_modified; end
alias_method :any_modified?, :is_any_modified
# Returns true if a property editor control has focus.
# @return [Boolean]
def is_editor_focused; end
alias_method :editor_focused?, :is_editor_focused
# Returns true if updating is frozen (i.e.
#
# {Wx::PG::PropertyGrid#freeze} called but not yet {Wx::PG::PropertyGrid#thaw} ).
# @return [Boolean]
def is_frozen; end
alias_method :frozen?, :is_frozen
# Makes given column editable by user.
#
# Note that column must not be equal to 1, as the second column is always editable and can be made read-only only on cell-by-cell basis using
# ```ruby
# # see Wx::PG::PGProperty#change_flag
# property.change_flag(Wx::PG::PG_PROP_READONLY, true)
# ```
# @see Wx::PG::PropertyGrid#begin_label_edit
# @see Wx::PG::PropertyGrid#end_label_edit
# @param column [Integer] The index of the column to make editable.
# @param editable [Boolean] Using false here will disable column from being editable.
# @return [void]
def make_column_editable(column, editable=true) end
# It is recommended that you call this function any time your code causes {Wx::PG::PropertyGrid}'s top-level parent to change.
#
# {Wx::PG::PropertyGrid}'s OnIdle() handler should be able to detect most changes, but it is not perfect.
#
#
# @param newTLP [Wx::Window] New top-level parent that is about to be set. Old top-level parent window should still exist as the current one.
# @return [void]
def on_tlp_changing(newTLP) end
# Refreshes any active editor control.
# @return [void]
def refresh_editor; end
# Redraws given property.
# @param p [Wx::PG::PGProperty]
# @return [void]
def refresh_property(p) end
# Resets all colours to the original system values.
# @return [void]
def reset_colours; end
# Resets column sizes and splitter positions, based on proportions.
#
#
# @see Wx::PG::PropertyGridInterface#set_column_proportion
# @param enableAutoResizing [Boolean] If true, automatic column resizing is enabled (only applicable if window style {Wx::PG::PG_WINDOW_STYLES::PG_SPLITTER_AUTO_CENTER} is used).
# @return [void]
def reset_column_sizes(enableAutoResizing=false) end
# Removes given property from selection.
#
# If property is not selected, an assertion failure will occur.
# @param id [String,Wx::PG::PGProperty]
# @return [Boolean]
def remove_from_selection(id) end
# Selects a property.
#
# Editor widget is automatically created, but not focused unless focus is true.
#
# returns true if selection finished successfully. Usually only fails if current value in editor is not valid.
#
#
#
#
# @see Wx::PG::PropertyGridInterface#clear_selection
# @param id [String,Wx::PG::PGProperty] Property to select (name or pointer).
# @param focus [Boolean] If true, move keyboard focus to the created editor right away.
# @return [Boolean]
def select_property(id, focus=false) end
# Sets category caption background colour.
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_caption_background_colour(col) end
alias_method :caption_background_colour=, :set_caption_background_colour
# Sets category caption text colour.
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_caption_text_colour(col) end
alias_method :caption_text_colour=, :set_caption_text_colour
# Sets default cell background colour - applies to property cells.
#
# Note that appearance of editor widgets may not be affected.
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_cell_background_colour(col) end
alias_method :cell_background_colour=, :set_cell_background_colour
# Sets cell text colour for disabled properties.
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_cell_disabled_text_colour(col) end
alias_method :cell_disabled_text_colour=, :set_cell_disabled_text_colour
# Sets default cell text colour - applies to property name and value text.
#
# Note that appearance of editor widgets may not be affected.
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_cell_text_colour(col) end
alias_method :cell_text_colour=, :set_cell_text_colour
# Set number of columns (2 or more).
# @param colCount [Integer]
# @return [void]
def set_column_count(colCount) end
alias_method :column_count=, :set_column_count
# Sets the 'current' category - Append will add non-category properties under it.
# @param id [String,Wx::PG::PGProperty]
# @return [void]
def set_current_category(id) end
alias_method :current_category=, :set_current_category
# Sets colour of empty space below properties.
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_empty_space_colour(col) end
alias_method :empty_space_colour=, :set_empty_space_colour
# Sets colour of lines between cells.
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_line_colour(col) end
alias_method :line_colour=, :set_line_colour
# Sets background colour of margin.
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_margin_colour(col) end
alias_method :margin_colour=, :set_margin_colour
# Set entire new selection from given list of properties.
# @param newSelection [Array]
# @return [void]
def set_selection(newSelection) end
alias_method :selection=, :set_selection
# Sets selection background colour - applies to selected property name background.
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_selection_background_colour(col) end
alias_method :selection_background_colour=, :set_selection_background_colour
# Sets selection foreground colour - applies to selected property name text.
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_selection_text_colour(col) end
alias_method :selection_text_colour=, :set_selection_text_colour
# Sets x coordinate of the splitter.
#
#
# @param newxpos [Integer]
# @param col [Integer]
# @return [void]
def set_splitter_position(newxpos, col=0) end
alias_method :splitter_position=, :set_splitter_position
# Moves splitter as left as possible, while still allowing all labels to be shown in full.
# @param privateChildrenToo [Boolean] If false, will still allow private children to be cropped.
# @return [void]
def set_splitter_left(privateChildrenToo=false) end
alias_method :splitter_left=, :set_splitter_left
# Sets appearance of value cells representing an unspecified property value.
#
# Default appearance is blank.
#
#
# @see Wx::PG::PGProperty#set_value_to_unspecified
# @see Wx::PG::PGProperty#is_value_unspecified
# @param cell [Wx::PG::PGCell]
# @return [void]
def set_unspecified_value_appearance(cell) end
alias_method :unspecified_value_appearance=, :set_unspecified_value_appearance
# Sets vertical spacing.
#
# Can be 1, 2, or 3 - a value relative to font height. Value of 2 should be default on most platforms.
# @param vspacing [Integer]
# @return [void]
def set_vertical_spacing(vspacing) end
alias_method :vertical_spacing=, :set_vertical_spacing
# Set virtual width for this particular page.
#
# Width -1 indicates that the virtual width should be disabled.
# @param width [Integer]
# @return [void]
def set_virtual_width(width) end
alias_method :virtual_width=, :set_virtual_width
# Must be called in {Wx::PG::PGEditor#create_controls} if primary editor window is {Wx::TextCtrl}, just before textctrl is created.
# @param text [String] Initial text value of created {Wx::TextCtrl}.
# @return [void]
def setup_text_ctrl_value(text) end
# Unfocuses or closes editor if one was open, but does not deselect property.
# @return [Boolean]
def unfocus_editor; end
# Draws item, children, and consecutive parents as long as category is not met.
# @param p [Wx::PG::PGProperty]
# @return [void]
def draw_item_and_value_related(p) end
# This static function enables or disables automatic use of {get_translation} for following strings: {Wx::PG::EnumProperty} list labels, {Wx::PG::FlagsProperty} child property labels.
#
# Default is false.
# @param enable [Boolean]
# @return [void]
def self.auto_get_translation(enable) end
# Registers a new editor class.
#
# Returns pointer to the editor class instance that should be used.
# @param editor [Wx::PG::PGEditor]
# @param name [String]
# @return [Wx::PG::PGEditor]
def self.do_register_editor_class(editor, name) end
end # PropertyGrid
end