pub struct CommandSet { /* private fields */ }Expand description
Command set bitfield for tracking enabled/disabled commands
Matches Borland’s TCommandSet (cmdset.h:14-84)
Uses a bitfield array where each command ID is a bit position
Implementations§
Source§impl CommandSet
impl CommandSet
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new command set with all commands disabled
Matches Borland: TCommandSet::TCommandSet() (tcommand.cc:41-48)
Sourcepub fn with_all_enabled() -> Self
pub fn with_all_enabled() -> Self
Create a command set with all commands enabled
Matches Borland: TCommandSet::enableAllCommands() (tcommand.cc:132-137)
Sourcepub fn has(&self, command: CommandId) -> bool
pub fn has(&self, command: CommandId) -> bool
Check if a command is enabled
Matches Borland: TCommandSet::has(int cmd) (tcommand.cc:108-112)
Sourcepub fn enable_command(&mut self, command: CommandId)
pub fn enable_command(&mut self, command: CommandId)
Enable a single command
Matches Borland: TCommandSet::enableCmd(int cmd) (tcommand.cc:139-145)
Sourcepub fn disable_command(&mut self, command: CommandId)
pub fn disable_command(&mut self, command: CommandId)
Disable a single command
Matches Borland: TCommandSet::disableCmd(int cmd) (tcommand.cc:180-186)
Sourcepub fn enable_range(&mut self, cmd_start: CommandId, cmd_end: CommandId)
pub fn enable_range(&mut self, cmd_start: CommandId, cmd_end: CommandId)
Enable a range of commands (inclusive)
Matches Borland: TCommandSet::enableCmd(int cmdStart, int cmdEnd) (tcommand.cc:147-179)
Sourcepub fn disable_range(&mut self, cmd_start: CommandId, cmd_end: CommandId)
pub fn disable_range(&mut self, cmd_start: CommandId, cmd_end: CommandId)
Disable a range of commands (inclusive)
Matches Borland: TCommandSet::disableCmd(int cmdStart, int cmdEnd) (tcommand.cc:188-220)
Sourcepub fn enable_set(&mut self, other: &CommandSet)
pub fn enable_set(&mut self, other: &CommandSet)
Enable all commands in another command set
Matches Borland: TCommandSet::enableCmd(const TCommandSet&) (tcommand.cc:222-228)
Sourcepub fn disable_set(&mut self, other: &CommandSet)
pub fn disable_set(&mut self, other: &CommandSet)
Disable all commands in another command set
Matches Borland: TCommandSet::disableCmd(const TCommandSet&) (tcommand.cc:230-236)
Sourcepub fn enable_all(&mut self)
pub fn enable_all(&mut self)
Enable all commands
Matches Borland: TCommandSet::enableAllCommands() (tcommand.cc:132-137)
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Check if command set is empty (all commands disabled)
Matches Borland: TCommandSet::isEmpty() (tcommand.cc:114-125)
Sourcepub fn intersect(&mut self, other: &CommandSet)
pub fn intersect(&mut self, other: &CommandSet)
Perform bitwise AND with another command set
Matches Borland: TCommandSet::operator&=(const TCommandSet&) (tcommand.cc:259-268)
Sourcepub fn union(&mut self, other: &CommandSet)
pub fn union(&mut self, other: &CommandSet)
Perform bitwise OR with another command set
Matches Borland: TCommandSet::operator|=(const TCommandSet&) (tcommand.cc:249-257)