#include <rs_blocklist.h>
Public Member Functions | |
| RS_BlockList (bool owner=false) | |
| Constructor. | |
| void | clear () |
| Removes all blocks in the blocklist. | |
| int | count () |
| RS_Block * | at (int i) |
| void | activate (const RS_String &name) |
| Activates the given block. | |
| void | activate (RS_Block *block) |
| Activates the given block. | |
| RS_Block * | getActive () |
| virtual bool | add (RS_Block *block, bool notify=true) |
| Adds a block to the block list. | |
| virtual void | addNotification (RS_Block *block) |
| Notifies the listeners about blocks that were added. | |
| virtual void | remove (RS_Block *block) |
| Removes a block from the list. | |
| virtual bool | rename (RS_Block *block, const RS_String &name) |
| Tries to rename the given block to 'name'. | |
| RS_Block * | find (const RS_String &name) |
| RS_String | newName (const RS_String &suggestion="") |
| Finds a new unique block name. | |
| void | toggle (const RS_String &name) |
| Switches on / off the given block. | |
| void | toggle (RS_Block *block) |
| Switches on / off the given block. | |
| void | freezeAll (bool freeze) |
| Freezes or defreezes all blocks. | |
| void | addListener (RS_BlockListListener *listener) |
| adds a BlockListListener to the list of listeners. | |
| void | removeListener (RS_BlockListListener *listener) |
| removes a BlockListListener from the list of listeners. | |
| void | setModified (bool m) |
| Sets the layer lists modified status to 'm'. | |
| virtual bool | isModified () const |
Friends | |
| std::ostream & | operator<< (std::ostream &os, RS_BlockList &b) |
|
|
Constructor.
|
|
|
Activates the given block. Listeners are notified. |
|
|
Activates the given block. Listeners are notified. |
|
||||||||||||
|
Adds a block to the block list. If a block with the same name exists already, the given block will be deleted if the blocklist owns the blocks.
|
|
|
adds a BlockListListener to the list of listeners.
|
|
|
Notifies the listeners about blocks that were added. This can be used after adding a lot of blocks without auto-update or simply to force an update of GUI blocklists. |
|
|
|
|
|
|
|
|
|
|
|
Freezes or defreezes all blocks.
|
|
|
|
|
|
|
|
|
Finds a new unique block name.
|
|
|
Removes a block from the list. Listeners are notified after the block was removed from the list but before it gets deleted. |
|
||||||||||||
|
Tries to rename the given block to 'name'. Block names are unique in the block list.
|
|
|
Switches on / off the given block. Listeners are notified. |
|
|
Switches on / off the given block. Listeners are notified. |
1.4.4