# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::RTC # The base class for file handlers. # # Category: Rich Text # @see Wx::RTC::RichTextBuffer # @see Wx::RTC::RichTextCtrl # # # @wxrb_require USE_RICHTEXT class RichTextFileHandler < Object # Creates a file handler object. # @param name [String] # @param ext [String] # @param type [Integer] # @return [Wx::RTC::RichTextFileHandler] def initialize(name=(''), ext=(''), type=0) end # @overload load_file(buffer, stream) # Loads the buffer from a stream. # # Not all handlers will implement file loading. # @param buffer [Wx::RTC::RichTextBuffer] # @param stream [IO,Wx::InputStream] # @return [Boolean] # @overload load_file(buffer, filename) # Loads the buffer from a file. # @param buffer [Wx::RTC::RichTextBuffer] # @param filename [String] # @return [Boolean] def load_file(*args) end # @overload save_file(buffer, stream) # Saves the buffer to a stream. # # Not all handlers will implement file saving. # @param buffer [Wx::RTC::RichTextBuffer] # @param stream [IO,Wx::OutputStream] # @return [Boolean] # @overload save_file(buffer, filename) # Saves the buffer to a file. # @param buffer [Wx::RTC::RichTextBuffer] # @param filename [String] # @return [Boolean] def save_file(*args) end # Returns true if we handle this filename (if using files). # # By default, checks the extension. # @param filename [String] # @return [Boolean] def can_handle(filename) end alias_method :can_handle?, :can_handle # Returns true if we can save using this handler. # @return [Boolean] def can_save; end alias_method :can_save?, :can_save # Returns true if we can load using this handler. # @return [Boolean] def can_load; end alias_method :can_load?, :can_load # Returns true if this handler should be visible to the user. # @return [Boolean] def is_visible; end alias_method :visible?, :is_visible # Sets whether the handler should be visible to the user (via the application's load and save dialogs). # @param visible [Boolean] # @return [void] def set_visible(visible) end alias_method :visible=, :set_visible # Sets the name of the handler. # @param name [String] # @return [void] def set_name(name) end alias_method :name=, :set_name # Returns the name of the handler. # @return [String] def get_name; end alias_method :name, :get_name # Sets the default extension to recognise. # @param ext [String] # @return [void] def set_extension(ext) end alias_method :extension=, :set_extension # Returns the default extension to recognise. # @return [String] def get_extension; end alias_method :extension, :get_extension # Sets the handler type. # @param type [Integer] # @return [void] def set_type(type) end alias_method :type=, :set_type # Returns the handler type. # @return [Integer] def get_type; end alias_method :type, :get_type # Sets flags that change the behaviour of loading or saving. # # See the documentation for each handler class to see what flags are relevant for each handler. # You call this function directly if you are using a file handler explicitly (without going through the text control or buffer LoadFile/SaveFile API). Or, you can call the control or buffer's SetHandlerFlags function to set the flags that will be used for subsequent load and save operations. # @param flags [Integer] # @return [void] def set_flags(flags) end alias_method :flags=, :set_flags # Returns flags controlling how loading and saving is done. # @return [Integer] def get_flags; end alias_method :flags, :get_flags # Sets the encoding to use when saving a file. # # If empty, a suitable encoding is chosen. # @param encoding [String] # @return [void] def set_encoding(encoding) end alias_method :encoding=, :set_encoding # Returns the encoding to use when saving a file. # # If empty, a suitable encoding is chosen. # @return [Wx::String] def get_encoding; end alias_method :encoding, :get_encoding end # RichTextFileHandler # Implements saving a buffer to plain text. # # Category: Rich Text # @see Wx::RTC::RichTextFileHandler # @see Wx::RTC::RichTextBuffer # @see Wx::RTC::RichTextCtrl # # # @wxrb_require USE_RICHTEXT class RichTextPlainTextHandler < RichTextFileHandler # @param name [String] # @param ext [String] # @param type [Wx::RichTextFileType] # @return [Wx::RTC::RichTextPlainTextHandler] def initialize(name=("TEXT"), ext=("TXT"), type=Wx::RTC::RichTextFileType::RICHTEXT_TYPE_TEXT) end # Returns true if we can save using this handler. # @return [Boolean] def can_save; end alias_method :can_save?, :can_save # Returns true if we can load using this handler. # @return [Boolean] def can_load; end alias_method :can_load?, :can_load end # RichTextPlainTextHandler end