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).



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

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)


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

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)


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

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 NULL.



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

def clear_commands; end

#get_edit_menuWx::Menu Also known as: edit_menu

Returns the edit menu associated with the command processor.

Returns:



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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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.



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

def mark_as_saved; end

#redo_Boolean

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

Returns:

  • (Boolean)


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

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 NULL 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:



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

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.



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

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)


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

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)


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

def set_undo_accelerator(accel) end

#undoBoolean

Undoes the last command executed.

Returns:

  • (Boolean)


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

def undo; end