Class: Wx::RTC::CommandProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/rtc/rich_text_ctrl.rb

Overview

CommandProcessor is a class that maintains a history of Commands, with undo/redo functionality built-in.

Derive a new class from this if you want different behaviour.

Category: Document/View Framework

See Also:

  • Overview
  • Command

Requires:

  • USE_RICHTEXT

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initializevoid

Initializes the command processor, setting the current command to the last in the list (if any), and updating the edit menu (if one has been specified).



2001
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2001

def initialize(maxCommands=-1) end

Instance Method Details

#can_redoBoolean Also known as: can_redo?

Returns true if the currently-active command can be redone, false otherwise.

Returns:

  • (Boolean)


2010
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2010

def can_redo; end

#can_undoBoolean Also known as: can_undo?

Returns true if the currently-active command can be undone, false otherwise.

Returns:

  • (Boolean)


2005
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2005

def can_undo; end

#clear_commandsvoid

This method returns an undefined value.

Deletes all commands in the list and sets the current command pointer to nil.



2015
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2015

def clear_commands; end

#get_edit_menuWx::Menu Also known as: edit_menu

Returns the edit menu associated with the command processor.

Returns:



2019
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2019

def get_edit_menu; end

#get_max_commandsInteger Also known as: max_commands

Returns the maximum number of commands that the command processor stores.

Returns:

  • (Integer)


2024
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2024

def get_max_commands; end

#get_redo_acceleratorWx::String Also known as: redo_accelerator

Returns the string that will be appended to the Redo menu item.

Returns:

  • (Wx::String)


2029
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2029

def get_redo_accelerator; end

#get_redo_menu_labelString Also known as: redo_menu_label

Returns the string that will be shown for the redo menu item.

Returns:

  • (String)


2034
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2034

def get_redo_menu_label; end

#get_undo_acceleratorWx::String Also known as: undo_accelerator

Returns the string that will be appended to the Undo menu item.

Returns:

  • (Wx::String)


2039
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2039

def get_undo_accelerator; end

#get_undo_menu_labelString Also known as: undo_menu_label

Returns the string that will be shown for the undo menu item.

Returns:

  • (String)


2044
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2044

def get_undo_menu_label; end

#is_dirtyBoolean Also known as: dirty?

Returns a boolean value that indicates if changes have been made since the last save operation.

This only works if #mark_as_saved is called whenever the project is saved.

Returns:

  • (Boolean)


2055
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2055

def is_dirty; end

#mark_as_savedvoid

This method returns an undefined value.

You must call this method whenever the project is saved if you plan to use #is_dirty.



2060
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2060

def mark_as_saved; end

#redo_Boolean

Executes (redoes) the current command (the command that has just been undone if any).

Returns:

  • (Boolean)


2064
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2064

def redo_; end

#set_edit_menu(menu) ⇒ void Also known as: edit_menu=

This method returns an undefined value.

Tells the command processor to update the Undo and Redo items on this menu as appropriate.

Set this to nil if the menu is about to be destroyed and command operations may still be performed, or the command processor may try to access an invalid pointer.

Parameters:



2071
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2071

def set_edit_menu(menu) end

#set_menu_stringsvoid

This method returns an undefined value.

Sets the menu labels according to the currently set menu and the current command state.



2076
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2076

def set_menu_strings; end

#set_redo_accelerator(accel) ⇒ void Also known as: redo_accelerator=

This method returns an undefined value.

Sets the string that will be appended to the Redo menu item.

Parameters:

  • accel (String)


2081
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2081

def set_redo_accelerator(accel) end

#set_undo_accelerator(accel) ⇒ void Also known as: undo_accelerator=

This method returns an undefined value.

Sets the string that will be appended to the Undo menu item.

Parameters:

  • accel (String)


2087
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2087

def set_undo_accelerator(accel) end

#undoBoolean

Undoes the last command executed.

Returns:

  • (Boolean)


2092
# File 'lib/wx/doc/gen/rtc/rich_text_ctrl.rb', line 2092

def undo; end