# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::PG # PG_COLOUR_WEB_BASE = 65536 # PG_COLOUR_CUSTOM = 16777215 # PG_COLOUR_UNSPECIFIED = 16777216 # PG_PROP_TRANSLATE_CUSTOM = 524288 # @return [Wx::String] def self.pg_get_default_image_wildcard; end # Base class for custom {Wx::PG::PropertyGrid} editors. # - Names of built-in property editors are: TextCtrl, Choice, ComboBox, CheckBox, TextCtrlAndButton, and ChoiceAndButton. Additional editors include SpinCtrl and DatePickerCtrl, but using them requires calling {Wx::PG::PropertyGrid#register_additional_editors} prior use.- Pointer to built-in editor is available as {Wx::PGEditor_EditorName} (e.g. {Wx::PG_EDITOR_TEXT_CTRL}).- Before you start using new editor you just created, you need to register it using static function {Wx::PG::PropertyGrid.register_editor_class}, with code like this: # ``` # wxPGEditor* editorPointer = wxPropertyGrid::RegisterEditorClass(new MyEditorClass(), "MyEditor"); # ``` # After that, {Wx::PG::PropertyGrid} will take ownership of the given object, but you should still store editorPointer somewhere, so you can pass it to {Wx::PG::PGProperty#set_editor}, or return it from {Wx::PG::PGEditor#do_get_editor_class}. # # === # # Category: {Wx::PG::PropertyGrid} # class PGEditor < Object # Constructor. # @return [PGEditor] def initialize; end # Returns pointer to the name of the editor. # For example, {Wx::PG_EDITOR_TEXT_CTRL} has name "TextCtrl". If you don't need to access your custom editor by string name, then you do not need to implement this function. # @return [String] def get_name; end alias_method :name, :get_name # Instantiates editor controls. # - It is not necessary to call {Wx::EvtHandler#bind} for interesting editor events. All events from controls are automatically forwarded to {Wx::PG::PGEditor#on_event} and {Wx::PG::PGProperty#on_event}. # @param propgrid [Wx::PropertyGrid] {Wx::PG::PropertyGrid} to which the property belongs (use as parent for control). # @param property [Wx::PGProperty] Property for which this method is called. # @param pos [Array(Integer, Integer), Wx::Point] Position, inside {Wx::PG::PropertyGrid}, to create control(s) to. # @param size [Array(Integer, Integer), Wx::Size] Initial size for control(s). # @return [Wx::Window,Array] def create_controls(propgrid, property, pos, size) end # Loads value from property to the control. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [void] def update_control(property, ctrl) end # Draws value for given property. # @param dc [Wx::DC] # @param rect [Wx::Rect] # @param property [Wx::PGProperty] # @param text [String] # @return [void] def draw_value(dc, rect, property, text) end # Handles events. # Returns true if value in control was modified (see {Wx::PG::PGProperty#on_event} for more information). # {Wx::PG::PropertyGrid} will automatically unfocus the editor when {Wx::EVT_TEXT_ENTER} is received and when it results in property value being modified. This happens regardless of editor type (i.e. behaviour is same for any {Wx::TextCtrl} and {Wx::ComboBox} based editor). # @param propgrid [Wx::PropertyGrid] # @param property [Wx::PGProperty] # @param wnd_primary [Wx::Window] # @param event [Wx::Event] # @return [true,false] def on_event(propgrid, property, wnd_primary, event) end # Returns value from control, via parameter variant. # Usually ends up calling property's StringToValue() or IntToValue(). Returns true if value was different. # @param variant [Wx::Variant] # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [true,false] def get_value_from_control(variant, property, ctrl) end alias_method :value_from_control, :get_value_from_control # Sets value in control to unspecified. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [void] def set_value_to_unspecified(property, ctrl) end # Called by property grid to set new appearance for the control. # Default implementation sets foreground colour, background colour, font, plus text for {Wx::TextCtrl} and {Wx::ComboCtrl}. # @param pg [Wx::PropertyGrid] Property grid to which the edited property belongs. # @param property [Wx::PGProperty] Edited property to which the editor control belongs. # @param ctrl [Wx::Window] Editor control. # @param appearance [Wx::PGCell] New appearance to be applied. # @param oldAppearance [Wx::PGCell] Previously applied appearance. Used to detect which control attributes need to be changed (e.g. so we only change background colour if really needed). # @param unspecified [true,false] If true tells this function that the new appearance represents an unspecified property value. # @return [void] def set_control_appearance(pg, property, ctrl, appearance, oldAppearance, unspecified) end # Sets control's value specifically from string. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @param txt [String] # @return [void] def set_control_string_value(property, ctrl, txt) end # Sets control's value specifically from int (applies to choice etc.). # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @param value [Integer] # @return [void] def set_control_int_value(property, ctrl, value) end # Inserts item to existing control. # Index -1 means end of list. Default implementation does nothing. Returns index of item added. # @param ctrl [Wx::Window] # @param label [String] # @param index [Integer] # @return [Integer] def insert_item(ctrl, label, index) end # Deletes item from existing control. # Default implementation does nothing. # @param ctrl [Wx::Window] # @param index [Integer] # @return [void] def delete_item(ctrl, index) end # Extra processing when control gains focus. # For example, {Wx::TextCtrl} based controls should select all text. # @param property [Wx::PGProperty] # @param wnd [Wx::Window] # @return [void] def on_focus(property, wnd) end # Returns true if control itself can contain the custom image. # Default implementation returns false. # @return [true,false] def can_contain_custom_image; end alias_method :can_contain_custom_image?, :can_contain_custom_image end # PGEditor # # # class PGCheckBoxEditor < PGEditor # @return [PGCheckBoxEditor] def initialize; end # Returns pointer to the name of the editor. # For example, {Wx::PG_EDITOR_TEXT_CTRL} has name "TextCtrl". If you don't need to access your custom editor by string name, then you do not need to implement this function. # @return [String] def get_name; end alias_method :name, :get_name # Instantiates editor controls. # - It is not necessary to call {Wx::EvtHandler#bind} for interesting editor events. All events from controls are automatically forwarded to {Wx::PG::PGEditor#on_event} and {Wx::PG::PGProperty#on_event}. # @param propgrid [Wx::PropertyGrid] {Wx::PG::PropertyGrid} to which the property belongs (use as parent for control). # @param property [Wx::PGProperty] Property for which this method is called. # @param pos [Array(Integer, Integer), Wx::Point] Position, inside {Wx::PG::PropertyGrid}, to create control(s) to. # @param size [Array(Integer, Integer), Wx::Size] Initial size for control(s). # @return [Wx::Window,Array] def create_controls(propgrid, property, pos, size) end # Loads value from property to the control. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [void] def update_control(property, ctrl) end # Handles events. # Returns true if value in control was modified (see {Wx::PG::PGProperty#on_event} for more information). # {Wx::PG::PropertyGrid} will automatically unfocus the editor when {Wx::EVT_TEXT_ENTER} is received and when it results in property value being modified. This happens regardless of editor type (i.e. behaviour is same for any {Wx::TextCtrl} and {Wx::ComboBox} based editor). # @param propgrid [Wx::PropertyGrid] # @param property [Wx::PGProperty] # @param wnd_primary [Wx::Window] # @param event [Wx::Event] # @return [true,false] def on_event(propgrid, property, wnd_primary, event) end # Returns value from control, via parameter variant. # Usually ends up calling property's StringToValue() or IntToValue(). Returns true if value was different. # @param variant [Wx::Variant] # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [true,false] def get_value_from_control(variant, property, ctrl) end alias_method :value_from_control, :get_value_from_control # Sets value in control to unspecified. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [void] def set_value_to_unspecified(property, ctrl) end # Draws value for given property. # @param dc [Wx::DC] # @param rect [Wx::Rect] # @param property [Wx::PGProperty] # @param text [String] # @return [void] def draw_value(dc, rect, property, text) end # Sets control's value specifically from int (applies to choice etc.). # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @param value [Integer] # @return [void] def set_control_int_value(property, ctrl, value) end end # PGCheckBoxEditor # # # class PGChoiceEditor < PGEditor # @return [PGChoiceEditor] def initialize; end # Instantiates editor controls. # - It is not necessary to call {Wx::EvtHandler#bind} for interesting editor events. All events from controls are automatically forwarded to {Wx::PG::PGEditor#on_event} and {Wx::PG::PGProperty#on_event}. # @param propgrid [Wx::PropertyGrid] {Wx::PG::PropertyGrid} to which the property belongs (use as parent for control). # @param property [Wx::PGProperty] Property for which this method is called. # @param pos [Array(Integer, Integer), Wx::Point] Position, inside {Wx::PG::PropertyGrid}, to create control(s) to. # @param size [Array(Integer, Integer), Wx::Size] Initial size for control(s). # @return [Wx::Window,Array] def create_controls(propgrid, property, pos, size) end # Loads value from property to the control. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [void] def update_control(property, ctrl) end # Handles events. # Returns true if value in control was modified (see {Wx::PG::PGProperty#on_event} for more information). # {Wx::PG::PropertyGrid} will automatically unfocus the editor when {Wx::EVT_TEXT_ENTER} is received and when it results in property value being modified. This happens regardless of editor type (i.e. behaviour is same for any {Wx::TextCtrl} and {Wx::ComboBox} based editor). # @param propgrid [Wx::PropertyGrid] # @param property [Wx::PGProperty] # @param wnd_primary [Wx::Window] # @param event [Wx::Event] # @return [true,false] def on_event(propgrid, property, wnd_primary, event) end # Returns value from control, via parameter variant. # Usually ends up calling property's StringToValue() or IntToValue(). Returns true if value was different. # @param variant [Wx::Variant] # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [true,false] def get_value_from_control(variant, property, ctrl) end alias_method :value_from_control, :get_value_from_control # Sets value in control to unspecified. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [void] def set_value_to_unspecified(property, ctrl) end # Returns pointer to the name of the editor. # For example, {Wx::PG_EDITOR_TEXT_CTRL} has name "TextCtrl". If you don't need to access your custom editor by string name, then you do not need to implement this function. # @return [String] def get_name; end alias_method :name, :get_name # Sets control's value specifically from int (applies to choice etc.). # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @param value [Integer] # @return [void] def set_control_int_value(property, ctrl, value) end # Sets control's value specifically from string. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @param txt [String] # @return [void] def set_control_string_value(property, ctrl, txt) end # Inserts item to existing control. # Index -1 means end of list. Default implementation does nothing. Returns index of item added. # @param ctrl [Wx::Window] # @param label [String] # @param index [Integer] # @return [Integer] def insert_item(ctrl, label, index) end # Deletes item from existing control. # Default implementation does nothing. # @param ctrl [Wx::Window] # @param index [Integer] # @return [void] def delete_item(ctrl, index) end # Returns true if control itself can contain the custom image. # Default implementation returns false. # @return [true,false] def can_contain_custom_image; end alias_method :can_contain_custom_image?, :can_contain_custom_image # @param propgrid [Wx::PropertyGrid] # @param property [Wx::PGProperty] # @param pos [Array(Integer, Integer), Wx::Point] # @param sz [Array(Integer, Integer), Wx::Size] # @param extraStyle [Integer] # @return [Wx::Window] def create_controls_base(propgrid, property, pos, sz, extraStyle) end end # PGChoiceEditor # # # class PGChoiceAndButtonEditor < PGChoiceEditor # @return [PGChoiceAndButtonEditor] def initialize; end # Returns pointer to the name of the editor. # For example, {Wx::PG_EDITOR_TEXT_CTRL} has name "TextCtrl". If you don't need to access your custom editor by string name, then you do not need to implement this function. # @return [String] def get_name; end alias_method :name, :get_name # Instantiates editor controls. # - It is not necessary to call {Wx::EvtHandler#bind} for interesting editor events. All events from controls are automatically forwarded to {Wx::PG::PGEditor#on_event} and {Wx::PG::PGProperty#on_event}. # @param propgrid [Wx::PropertyGrid] {Wx::PG::PropertyGrid} to which the property belongs (use as parent for control). # @param property [Wx::PGProperty] Property for which this method is called. # @param pos [Array(Integer, Integer), Wx::Point] Position, inside {Wx::PG::PropertyGrid}, to create control(s) to. # @param size [Array(Integer, Integer), Wx::Size] Initial size for control(s). # @return [Wx::Window,Array] def create_controls(propgrid, property, pos, size) end end # PGChoiceAndButtonEditor # # # class PGComboBoxEditor < PGChoiceEditor # @return [PGComboBoxEditor] def initialize; end # Instantiates editor controls. # - It is not necessary to call {Wx::EvtHandler#bind} for interesting editor events. All events from controls are automatically forwarded to {Wx::PG::PGEditor#on_event} and {Wx::PG::PGProperty#on_event}. # @param propgrid [Wx::PropertyGrid] {Wx::PG::PropertyGrid} to which the property belongs (use as parent for control). # @param property [Wx::PGProperty] Property for which this method is called. # @param pos [Array(Integer, Integer), Wx::Point] Position, inside {Wx::PG::PropertyGrid}, to create control(s) to. # @param size [Array(Integer, Integer), Wx::Size] Initial size for control(s). # @return [Wx::Window,Array] def create_controls(propgrid, property, pos, size) end # Returns pointer to the name of the editor. # For example, {Wx::PG_EDITOR_TEXT_CTRL} has name "TextCtrl". If you don't need to access your custom editor by string name, then you do not need to implement this function. # @return [String] def get_name; end alias_method :name, :get_name # Loads value from property to the control. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [void] def update_control(property, ctrl) end # Handles events. # Returns true if value in control was modified (see {Wx::PG::PGProperty#on_event} for more information). # {Wx::PG::PropertyGrid} will automatically unfocus the editor when {Wx::EVT_TEXT_ENTER} is received and when it results in property value being modified. This happens regardless of editor type (i.e. behaviour is same for any {Wx::TextCtrl} and {Wx::ComboBox} based editor). # @param propgrid [Wx::PropertyGrid] # @param property [Wx::PGProperty] # @param wnd_primary [Wx::Window] # @param event [Wx::Event] # @return [true,false] def on_event(propgrid, property, wnd_primary, event) end # Returns value from control, via parameter variant. # Usually ends up calling property's StringToValue() or IntToValue(). Returns true if value was different. # @param variant [Wx::Variant] # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [true,false] def get_value_from_control(variant, property, ctrl) end alias_method :value_from_control, :get_value_from_control # Extra processing when control gains focus. # For example, {Wx::TextCtrl} based controls should select all text. # @param property [Wx::PGProperty] # @param wnd [Wx::Window] # @return [void] def on_focus(property, wnd) end end # PGComboBoxEditor # # # class PGTextCtrlEditor < PGEditor # @return [PGTextCtrlEditor] def initialize; end # Instantiates editor controls. # - It is not necessary to call {Wx::EvtHandler#bind} for interesting editor events. All events from controls are automatically forwarded to {Wx::PG::PGEditor#on_event} and {Wx::PG::PGProperty#on_event}. # @param propgrid [Wx::PropertyGrid] {Wx::PG::PropertyGrid} to which the property belongs (use as parent for control). # @param property [Wx::PGProperty] Property for which this method is called. # @param pos [Array(Integer, Integer), Wx::Point] Position, inside {Wx::PG::PropertyGrid}, to create control(s) to. # @param size [Array(Integer, Integer), Wx::Size] Initial size for control(s). # @return [Wx::Window,Array] def create_controls(propgrid, property, pos, size) end # Loads value from property to the control. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [void] def update_control(property, ctrl) end # Handles events. # Returns true if value in control was modified (see {Wx::PG::PGProperty#on_event} for more information). # {Wx::PG::PropertyGrid} will automatically unfocus the editor when {Wx::EVT_TEXT_ENTER} is received and when it results in property value being modified. This happens regardless of editor type (i.e. behaviour is same for any {Wx::TextCtrl} and {Wx::ComboBox} based editor). # @param propgrid [Wx::PropertyGrid] # @param property [Wx::PGProperty] # @param wnd_primary [Wx::Window] # @param event [Wx::Event] # @return [true,false] def on_event(propgrid, property, wnd_primary, event) end # Returns value from control, via parameter variant. # Usually ends up calling property's StringToValue() or IntToValue(). Returns true if value was different. # @param variant [Wx::Variant] # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [true,false] def get_value_from_control(variant, property, ctrl) end alias_method :value_from_control, :get_value_from_control # Returns pointer to the name of the editor. # For example, {Wx::PG_EDITOR_TEXT_CTRL} has name "TextCtrl". If you don't need to access your custom editor by string name, then you do not need to implement this function. # @return [String] def get_name; end alias_method :name, :get_name # Sets control's value specifically from string. # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @param txt [String] # @return [void] def set_control_string_value(property, ctrl, txt) end # Extra processing when control gains focus. # For example, {Wx::TextCtrl} based controls should select all text. # @param property [Wx::PGProperty] # @param wnd [Wx::Window] # @return [void] def on_focus(property, wnd) end # @param propgrid [Wx::PropertyGrid] # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @param event [Wx::Event] # @return [true,false] def self.on_text_ctrl_event(propgrid, property, ctrl, event) end # @param variant [Wx::Variant] # @param property [Wx::PGProperty] # @param ctrl [Wx::Window] # @return [true,false] def self.get_text_ctrl_value_from_control(variant, property, ctrl) end end # PGTextCtrlEditor # # # class PGSpinCtrlEditor < PGTextCtrlEditor # Returns pointer to the name of the editor. # For example, {Wx::PG_EDITOR_TEXT_CTRL} has name "TextCtrl". If you don't need to access your custom editor by string name, then you do not need to implement this function. # @return [String] def get_name; end alias_method :name, :get_name # Instantiates editor controls. # - It is not necessary to call {Wx::EvtHandler#bind} for interesting editor events. All events from controls are automatically forwarded to {Wx::PG::PGEditor#on_event} and {Wx::PG::PGProperty#on_event}. # @param propgrid [Wx::PropertyGrid] {Wx::PG::PropertyGrid} to which the property belongs (use as parent for control). # @param property [Wx::PGProperty] Property for which this method is called. # @param pos [Array(Integer, Integer), Wx::Point] Position, inside {Wx::PG::PropertyGrid}, to create control(s) to. # @param size [Array(Integer, Integer), Wx::Size] Initial size for control(s). # @return [Wx::Window,Array] def create_controls(propgrid, property, pos, size) end # Handles events. # Returns true if value in control was modified (see {Wx::PG::PGProperty#on_event} for more information). # {Wx::PG::PropertyGrid} will automatically unfocus the editor when {Wx::EVT_TEXT_ENTER} is received and when it results in property value being modified. This happens regardless of editor type (i.e. behaviour is same for any {Wx::TextCtrl} and {Wx::ComboBox} based editor). # @param propgrid [Wx::PropertyGrid] # @param property [Wx::PGProperty] # @param wnd_primary [Wx::Window] # @param event [Wx::Event] # @return [true,false] def on_event(propgrid, property, wnd_primary, event) end end # PGSpinCtrlEditor # # # class PGTextCtrlAndButtonEditor < PGTextCtrlEditor # @return [PGTextCtrlAndButtonEditor] def initialize; end # Returns pointer to the name of the editor. # For example, {Wx::PG_EDITOR_TEXT_CTRL} has name "TextCtrl". If you don't need to access your custom editor by string name, then you do not need to implement this function. # @return [String] def get_name; end alias_method :name, :get_name # Instantiates editor controls. # - It is not necessary to call {Wx::EvtHandler#bind} for interesting editor events. All events from controls are automatically forwarded to {Wx::PG::PGEditor#on_event} and {Wx::PG::PGProperty#on_event}. # @param propgrid [Wx::PropertyGrid] {Wx::PG::PropertyGrid} to which the property belongs (use as parent for control). # @param property [Wx::PGProperty] Property for which this method is called. # @param pos [Array(Integer, Integer), Wx::Point] Position, inside {Wx::PG::PropertyGrid}, to create control(s) to. # @param size [Array(Integer, Integer), Wx::Size] Initial size for control(s). # @return [Wx::Window,Array] def create_controls(propgrid, property, pos, size) end end # PGTextCtrlAndButtonEditor # Derive a class from this to adapt an existing editor dialog or function to be used when editor button of a property is pushed. # You only need to derive class and implement {Wx::PG::PGEditorDialogAdapter#do_show_dialog} to create and show the dialog, and finally submit the value returned by the dialog via {Wx::PG::PGEditorDialogAdapter#set_value}. # === # # Category: {Wx::PG::PropertyGrid} # class PGEditorDialogAdapter < Object # @return [PGEditorDialogAdapter] def initialize; end # @param propGrid [Wx::PropertyGrid] # @param property [Wx::PGProperty] # @return [true,false] def show_dialog(propGrid, property) end # @param propGrid [Wx::PropertyGrid] # @param property [Wx::PGProperty] # @return [true,false] def do_show_dialog(propGrid, property) end # @param value [nil,String,Integer,Float,Time,Wx::Font,Wx::Colour,Wx::Variant,Array,Array,ObjectWx::PG::ColourPropertyValue] # @return [void] def set_value(value) end alias_method :value=, :set_value # This method is typically only used if deriving class from existing adapter with value conversion purposes. # @return [Wx::Variant] def get_value; end alias_method :value, :get_value end # PGEditorDialogAdapter end