# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::RTC # RICHTEXT_FORMAT_STYLE_EDITOR = 1 # RICHTEXT_FORMAT_FONT = 2 # RICHTEXT_FORMAT_TABS = 4 # RICHTEXT_FORMAT_BULLETS = 8 # RICHTEXT_FORMAT_INDENTS_SPACING = 16 # This dialog allows the user to edit a character and/or paragraph style. # In the constructor, specify the pages that will be created. Use {Wx::RTC::RichTextFormattingDialog#get_style} to retrieve the common style for a given range, and then use {Wx::RTC::RichTextFormattingDialog#apply_style} to apply the user-selected formatting to a control. # For example: # ``` # wxRichTextRange range; # if (m_richTextCtrl->HasSelection()) # range = m_richTextCtrl->GetSelectionRange(); # else # range = wxRichTextRange(0, m_richTextCtrl->GetLastPosition()+1); # # int pages = wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_INDENTS_SPACING| \ # wxRICHTEXT_FORMAT_TABS|wxRICHTEXT_FORMAT_BULLETS; # # wxRichTextFormattingDialog formatDlg(pages, this); # formatDlg.GetStyle(m_richTextCtrl, range); # # if (formatDlg.ShowModal() == wxID_OK) # { # formatDlg.ApplyStyle(m_richTextCtrl, range); # } # ``` # # === # # Category: Rich Text # class RichTextFormattingDialog < PropertySheetDialog # # Option_AllowPixelFontSize = 1 # @overload initialize() # Default ctor. # @return [Wx::RTC::RichTextFormattingDialog] # @overload initialize(flags, parent, title=("FORMATTING"), id=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, sz=Wx::DEFAULT_SIZE, style=Wx::DEFAULT_DIALOG_STYLE) # Constructors. # @param flags [Integer] The pages to show. # @param parent [Wx::Window] The dialog's parent. # @param title [String] The dialog's title. # @param id [Integer] The dialog's ID. # @param pos [Array(Integer, Integer), Wx::Point] The dialog's position. # @param sz [Array(Integer, Integer), Wx::Size] The dialog's size. # @param style [Integer] The dialog's window style. # @return [Wx::RTC::RichTextFormattingDialog] def initialize(*args) end # Apply attributes to the given range, only changing attributes that need to be changed. # @param ctrl [Wx::RTC::RichTextCtrl] # @param range [Range] # @param flags [Integer] # @return [Boolean] def apply_style(ctrl, range, flags=(Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO|Wx::RTC::RICHTEXT_SETSTYLE_OPTIMIZE)) end # Creation: see {Wx::RTC::RichTextFormattingDialog#initialize} "the constructor" for details about the parameters. # @param flags [Integer] # @param parent [Wx::Window] # @param title [String] # @param id [Integer] # @param pos [Array(Integer, Integer), Wx::Point] # @param sz [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @return [Boolean] def create(flags, parent, title=(Wx::GetTranslation.new("FORMATTING")), id=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, sz=Wx::DEFAULT_SIZE, style=Wx::DEFAULT_DIALOG_STYLE) end # Gets the attributes being edited. # @return [Wx::TextAttr] def get_attributes; end alias_method :attributes, :get_attributes # Returns the image list associated with the dialog, used for example if showing the dialog as a toolbook. # @return [Wx::ImageList] def get_image_list; end alias_method :image_list, :get_image_list # Gets common attributes from the given range and calls {Wx::RTC::RichTextFormattingDialog#set_attributes}. # Attributes that do not have common values in the given range will be omitted from the style's flags. # @param ctrl [Wx::RTC::RichTextCtrl] # @param range [Range] # @return [Boolean] def get_style(ctrl, range) end alias_method :style, :get_style # Gets the associated style definition, if any. # @return [Wx::RTC::RichTextStyleDefinition] def get_style_definition; end alias_method :style_definition, :get_style_definition # Gets the associated style sheet, if any. # @return [Wx::RTC::RichTextStyleSheet] def get_style_sheet; end alias_method :style_sheet, :get_style_sheet # Sets the attributes to be edited. # @param attr [Wx::TextAttr] # @return [void] def set_attributes(attr) end alias_method :attributes=, :set_attributes # Sets the dialog options, determining what the interface presents to the user. # Currently the only option is Option_AllowPixelFontSize. # @param options [Integer] # @return [void] def set_options(options) end alias_method :options=, :set_options # Gets the dialog options, determining what the interface presents to the user. # Currently the only option is Option_AllowPixelFontSize. # @return [Integer] def get_options; end alias_method :options, :get_options # Returns true if the given option is present. # @param option [Integer] # @return [Boolean] def has_option(option) end alias_method :has_option?, :has_option # Sets the image list associated with the dialog's property sheet. # @param imageList [Wx::ImageList] # @return [void] def set_image_list(imageList) end alias_method :image_list=, :set_image_list # Sets the attributes and optionally updates the display, if update is true. # @param style [Wx::TextAttr] # @param update [Boolean] # @return [Boolean] def set_style(style, update=true) end alias_method :style=, :set_style # Sets the style definition and optionally update the display, if update is true. # @param styleDef [Wx::RTC::RichTextStyleDefinition] # @param sheet [Wx::RTC::RichTextStyleSheet] # @param update [Boolean] # @return [Boolean] def set_style_definition(styleDef, sheet, update=true) end # Updates the display. # @return [Boolean] def update_display; end # Helper for pages to get the top-level dialog. # @param win [Wx::Window] # @return [Wx::RTC::RichTextFormattingDialog] def self.get_dialog(win) end # Helper for pages to get the attributes. # @param win [Wx::Window] # @return [Wx::TextAttr] def self.get_dialog_attributes(win) end # Helper for pages to get the style. # @param win [Wx::Window] # @return [Wx::RTC::RichTextStyleDefinition] def self.get_dialog_style_definition(win) end # Returns the object to be used to customize the dialog and provide pages. # @return [Wx::RTC::RichTextFormattingDialogFactory] def self.get_formatting_dialog_factory; end # Sets the formatting factory object to be used for customization and page creation. # It deletes the existing factory object. # @param factory [Wx::RTC::RichTextFormattingDialogFactory] # @return [void] def self.set_formatting_dialog_factory(factory) end # Returns true if the dialog will restore the last-selected page. # @return [Boolean] def self.get_restore_last_page; end # Pass true if the dialog should restore the last-selected page. # @param b [Boolean] # @return [void] def self.set_restore_last_page(b) end # Returns the page identifier of the last page selected (not the control id). # @return [Integer] def self.get_last_page; end # Sets the page identifier of the last page selected (not the control id). # @param lastPage [Integer] # @return [void] def self.set_last_page(lastPage) end # Sets the custom colour data for use by the colour dialog. # @param colourData [Wx::ColourData] # @return [void] def self.set_colour_data(colourData) end # Returns the custom colour data for use by the colour dialog. # @return [Wx::ColourData] def self.get_colour_data; end end # RichTextFormattingDialog # This class provides pages for {Wx::RTC::RichTextFormattingDialog}, and allows other customization of the dialog. # A default instance of this class is provided automatically. If you wish to change the behaviour of the formatting dialog (for example add or replace a page), you may derive from this class, override one or more functions, and call the static function {Wx::RTC::RichTextFormattingDialog.set_formatting_dialog_factory}. # === # # Category: Rich Text # class RichTextFormattingDialogFactory < Object # Constructor. # @return [Wx::RTC::RichTextFormattingDialogFactory] def initialize; end # Creates the main dialog buttons. # @param dialog [Wx::RTC::RichTextFormattingDialog] # @return [Boolean] def create_buttons(dialog) end # Creates a page, given a page identifier. # @param page [Integer] # @param title [String] # @param dialog [Wx::RTC::RichTextFormattingDialog] # @return [Wx::Panel] def create_page(page, title, dialog) end # Creates all pages under the dialog's book control, also calling AddPage(). # @param pages [Integer] # @param dialog [Wx::RTC::RichTextFormattingDialog] # @return [Boolean] def create_pages(pages, dialog) end # Enumerate all available page identifiers. # @param i [Integer] # @return [Integer] def get_page_id(i) end alias_method :page_id, :get_page_id # Gets the number of available page identifiers. # @return [Integer] def get_page_id_count; end alias_method :page_id_count, :get_page_id_count # Gets the image index for the given page identifier. # @param id [Integer] # @return [Integer] def get_page_image(id) end alias_method :page_image, :get_page_image # Set the property sheet style, called at the start of {Wx::RTC::RichTextFormattingDialog#create}. # @param dialog [Wx::RTC::RichTextFormattingDialog] # @return [Boolean] def set_sheet_style(dialog) end alias_method :sheet_style=, :set_sheet_style # Invokes help for the dialog. # @param page [Integer] # @param dialog [Wx::RTC::RichTextFormattingDialog] # @return [Boolean] def show_help(page, dialog) end end # RichTextFormattingDialogFactory end