# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::PG # {Wx::PG::PropertyGridManager} is an efficient multi-page version of {Wx::PG::PropertyGrid}, which can optionally have toolbar for mode and page selection, a help text box, and a header. # {Wx::PG::PropertyGridManager} inherits from {Wx::PG::PropertyGridInterface}, and as such it has most property manipulation functions. However, only some of them affect properties on all pages (e.g. {Wx::PG::PropertyGridManager#get_property_by_name} and {Wx::PG::PropertyGridManager#expand_all}), while some (e.g. {Wx::PG::PropertyGridManager#append}) only apply to the currently selected page. # To operate explicitly on properties on specific page, use {Wx::PG::PropertyGridManager#get_page} to obtain pointer to page's {Wx::PG::PropertyGridPage} object. # Visual methods, such as SetCellBackgroundColour() are only available in {Wx::PG::PropertyGrid}. Use {Wx::PG::PropertyGridManager#get_grid} to obtain pointer to it. # Non-virtual iterators will not work in {Wx::PG::PropertyGridManager}. Instead, you must acquire the internal grid ({Wx::PG::PropertyGridManager#get_grid}) or {Wx::PG::PropertyGridPage} object ({Wx::PG::PropertyGridManager#get_page}). # {Wx::PG::PropertyGridManager} constructor has exact same format as {Wx::PG::PropertyGrid} constructor, and basically accepts same extra window style flags (albeit also has some extra ones). # Here's some example code for creating and populating a {Wx::PG::PropertyGridManager}: # # wxPropertyGridManager* pgMan = new wxPropertyGridManager(this, PGID, # wxDefaultPosition, wxDefaultSize, # // These and other similar styles are automatically # // passed to the embedded wxPropertyGrid. # wxPG_BOLD_MODIFIED|wxPG_SPLITTER_AUTO_CENTER| # // Include toolbar. # wxPG_TOOLBAR | # // Include description box. # wxPG_DESCRIPTION | # // Include compactor. # wxPG_COMPACTOR | # // Plus defaults. # wxPGMAN_DEFAULT_STYLE # ); # # wxPropertyGridPage* page; # # page = pgMan->AddPage("First Page"); # # page->Append( new wxPropertyCategory("Category A1") ); # # page->Append( new wxIntProperty("Number",wxPG_LABEL,1) ); # # page->Append( new wxColourProperty("Colour",wxPG_LABEL,*wxWHITE) ); # # page = pgMan->AddPage("Second Page"); # # page->Append( "Text",wxPG_LABEL,"(no text)" ); # # page->Append( new wxFontProperty("Font",wxPG_LABEL) ); # # // Display a header above the grid # pgMan->ShowHeader(); # # == Window Styles # # See wxPropertyGrid Window Styles. # # == Event Handling # # See wxPropertyGrid Event Handling for more information. # === # # Category: {Wx::PG::PropertyGrid} # class PropertyGridManager < Panel include Wx::PG::PropertyGridInterface # @overload initialize() # Two step constructor. # Call Create when this constructor is called to build up the {Wx::PG::PropertyGridManager}. # @return [PropertyGridManager] # @overload initialize(parent, id=Wx::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::PGMAN_DEFAULT_STYLE, name=Wx::PROPERTY_GRID_MANAGER_NAME_STR) # The default 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 [PropertyGridManager] def initialize(*args) end # Creates new property page. # Note that the first page is not created automatically. # # Returns pointer to created property grid page. # # If toolbar is used, it is highly recommended that the pages are added when the toolbar is not turned off using window style flag switching. Otherwise toolbar buttons might not be added properly. # @param label [String] A label for the page. This may be shown as a toolbar tooltip etc. # @param bmp [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] Bitmap bundle for toolbar image. If the bundle is empty, then a built-in default bitmap bundle is used. # @param pageObj [Wx::PropertyGridPage] {Wx::PG::PropertyGridPage} instance. Manager will take ownership of this object. NULL indicates that a default page instance should be created. # @return [Wx::PropertyGridPage] def add_page(label=Wx::EMPTY_STRING, bmp=(Wx::BitmapBundle.new()), pageObj=nil) end # Deletes all properties and all pages. # @return [void] def clear; end # Deletes all properties on given page. # @param page [Integer] # @return [void] def clear_page(page) end # Forces updating the value of property from the editor control. # Returns true if value was actually updated. # @param flags [Integer] # @return [true,false] 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 [true,false] def create(parent, id=Wx::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::PGMAN_DEFAULT_STYLE, name=Wx::PROPERTY_GRID_MANAGER_NAME_STR) end # Enables or disables (shows/hides) categories according to parameter enable. # Calling this may not properly update toolbar buttons. # @param enable [true,false] # @return [true,false] def enable_categories(enable) end # Selects page, 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 [true,false] def ensure_visible(id) end # Returns number of columns on given page. # By the default, returns number of columns on current page. # @param page [Integer] # @return [Integer] def get_column_count(page=-1) end alias_method :column_count, :get_column_count # Returns height of the description text box. # @return [Integer] def get_desc_box_height; end alias_method :desc_box_height, :get_desc_box_height # Returns pointer to the contained {Wx::PG::PropertyGrid}. # This does not change after {Wx::PG::PropertyGridManager} has been created, so you can safely obtain pointer once and use it for the entire lifetime of the manager instance. # @return [Wx::PropertyGrid] def get_grid; end alias_method :grid, :get_grid # Returns currently selected page. # @return [Wx::PropertyGridPage] def get_current_page; end alias_method :current_page, :get_current_page # @overload get_page(ind) # Returns page object for given page index. # @param ind [Integer] # @return [Wx::PropertyGridPage] # @overload get_page(name) # Returns page object for given page name. # @param name [String] # @return [Wx::PropertyGridPage] def get_page(*args) end alias_method :page, :get_page # Returns index for a page name. # If no match is found, {Wx::NOT_FOUND} is returned. # @param name [String] # @return [Integer] def get_page_by_name(name) end alias_method :page_by_name, :get_page_by_name # Returns index for a relevant propertygrid state. # If no match is found, {Wx::NOT_FOUND} is returned. # @param pstate [Wx::PropertyGridPageState] # @return [Integer] def get_page_by_state(pstate) end alias_method :page_by_state, :get_page_by_state # Returns number of managed pages. # @return [Integer] def get_page_count; end alias_method :page_count, :get_page_count # Returns name of given page. # @param index [Integer] # @return [Wx::String] def get_page_name(index) end alias_method :page_name, :get_page_name # Returns "root property" of the given page. # It does not have name, etc. and it is not visible. It is only useful for accessing its children. # @param index [Integer] # @return [Wx::PG::PGProperty] def get_page_root(index) end alias_method :page_root, :get_page_root # Returns index to currently selected page. # @return [Integer] def get_selected_page; end alias_method :selected_page, :get_selected_page # Alias for {Wx::PG::PropertyGridManager#get_selection}. # @return [Wx::PG::PGProperty] def get_selected_property; end alias_method :selected_property, :get_selected_property # Shortcut for {Wx::PG::PropertyGridManager#get_grid}->{Wx::PG::PropertyGridManager#get_selection}. # @return [Wx::PG::PGProperty] def get_selection; end alias_method :selection, :get_selection # Returns a pointer to the toolbar currently associated with the {Wx::PG::PropertyGridManager} (if any). # @return [Wx::ToolBar] def get_tool_bar; end alias_method :tool_bar, :get_tool_bar # Creates new property page. # Note that the first page is not created automatically. # # Returns pointer to created page. # @param index [Integer] Add to this position. -1 will add as the last item. # @param label [String] A label for the page. This may be shown as a toolbar tooltip etc. # @param bmp [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] Bitmap bundle for toolbar image. If the bundle is empty, then a built-in default bitmap bundle is used. # @param pageObj [Wx::PropertyGridPage] {Wx::PG::PropertyGridPage} instance. Manager will take ownership of this object. If NULL, default page object is constructed. # @return [Wx::PropertyGridPage] def insert_page(index, label, bmp=(Wx::BitmapBundle.new()), pageObj=nil) end # Returns true if any property on any page has been modified by the user. # @return [true,false] def is_any_modified; end alias_method :any_modified?, :is_any_modified # Returns true if any property on given page has been modified by the user. # @param index [Integer] # @return [true,false] def is_page_modified(index) end alias_method :page_modified?, :is_page_modified # Returns true if property is selected. # Since selection is page based, this function checks every page in the manager. # @param id [String,Wx::PG::PGProperty] # @return [true,false] def is_property_selected(id) end alias_method :property_selected?, :is_property_selected # Removes a page. # Returns false if it was not possible to remove page in question. # @param page [Integer] # @return [true,false] def remove_page(page) end # @overload select_page(index) # Select and displays a given page. # @param index [Integer] Index of page being selected. Can be -1 to select nothing. # @return [void] # @overload select_page(label) # Select and displays a given page (by label). # @param label [String] # @return [void] # @overload select_page(page) # Select and displays a given page. # @param page [Wx::PropertyGridPage] # @return [void] def select_page(*args) end # Select a property. # # @see Wx::PG::PropertyGrid#select_property # @see Wx::PG::PropertyGridInterface#clear_selection # @param id [String,Wx::PG::PGProperty] # @param focus [true,false] # @return [true,false] def select_property(id, focus=false) end # Sets number of columns on given page (default is current page). # If you use header, then you should always use this member function to set the column count, instead of ones present in {Wx::PG::PropertyGrid} or {Wx::PG::PropertyGridPage}. # @param colCount [Integer] # @param page [Integer] # @return [void] def set_column_count(colCount, page=-1) end alias_method :column_count=, :set_column_count # Sets a column title. # Default title for column 0 is "Property", and "Value" for column 1. # If header is not shown yet, then calling this member function will make it visible. # @param idx [Integer] # @param title [String] # @return [void] def set_column_title(idx, title) end # Sets label and text in description box. # @param label [String] # @param content [String] # @return [void] def set_description(label, content) end # Sets y coordinate of the description box splitter. # @param ht [Integer] # @param refresh [true,false] # @return [void] def set_desc_box_height(ht, refresh=true) end alias_method :desc_box_height=, :set_desc_box_height # Moves splitter as left as possible, while still allowing all labels to be shown in full. # @param subProps [true,false] If false, will still allow sub-properties (i.e. properties which parent is not root or category) to be cropped. # @param allPages [true,false] If true, takes labels on all pages into account. # @return [void] def set_splitter_left(subProps=false, allPages=true) end alias_method :splitter_left=, :set_splitter_left # Moves splitter as left as possible on an individual page, while still allowing all labels to be shown in full. # @param page [Integer] # @param subProps [true,false] # @return [void] def set_page_splitter_left(page, subProps=false) end alias_method :page_splitter_left=, :set_page_splitter_left # Sets splitter position on individual page. # If you use header, then you should always use this member function to set the splitter position, instead of ones present in {Wx::PG::PropertyGrid} or {Wx::PG::PropertyGridPage}. # @param page [Integer] # @param pos [Integer] # @param column [Integer] # @return [void] def set_page_splitter_position(page, pos, column=0) end # Sets splitter position for all pages. # Splitter position cannot exceed grid size, and therefore setting it during form creation may fail as initial grid size is often smaller than desired splitter position, especially when sizers are being used. # # If you use header, then you should always use this member function to set the splitter position, instead of ones present in {Wx::PG::PropertyGrid} or {Wx::PG::PropertyGridPage}. # @param pos [Integer] # @param column [Integer] # @return [void] def set_splitter_position(pos, column=0) end alias_method :splitter_position=, :set_splitter_position # Show or hide the property grid header control. # It is hidden by the default. # Grid may look better if you use {Wx::PG::PG_WINDOW_STYLES::PG_NO_INTERNAL_BORDER} window style when showing a header. # @param show [true,false] # @return [void] def show_header(show=true) end end # PropertyGridManager end