Logo Search packages:      
Sourcecode: k3d version File versions

k3d::black_box_recorder Class Reference

#include <black_box_recorder.h>

Inheritance diagram for k3d::black_box_recorder:

sdpGtkObjectContainer k3d::command_node sdpGtkIObjectContainer sdpGtkObject k3d::icommand_node k3d::iunknown

List of all members.

Detailed Description

Implements the black box recorder.

Definition at line 43 of file black_box_recorder.h.

Public Types

typedef std::vector< command_tcommands_t
 Defines a collection of commands.

Public Member Functions

sdpGtkAccelLabel AccelLabel (const std::string &ControlName)
sdpGtkAdjustment Adjustment (const std::string &ControlName)
sdpGtkAlignment Alignment (const std::string &ControlName)
sdpGtkArrow Arrow (const std::string &ControlName)
sdpGtkAspectFrame AspectFrame (const std::string &ControlName)
virtual bool AttachChild (sdpGtkIObjectContainer *const ObjectContainer, sdpxml::Document &Document, sdpxml::Element &ChildElement, sdpGtkObject *Child)
 Called after a child Gtk+ widget has been created to attach it to this instance.
bool Attached () const
 Returns true if we're attached to an existing Gtk+ object.
sdpGtkBin Bin (const std::string &ControlName)
 black_box_recorder (k3d::icommand_node &Parent, const boost::filesystem::path &LogFile)
void BlockAllEvents ()
 Blocks all object events.
sdpGtkBox Box (const std::string &ControlName)
sdpGtkButton Button (const std::string &ControlName)
sdpGtkButtonBox ButtonBox (const std::string &ControlName)
sdpGtkCalendar Calendar (const std::string &ControlName)
void CancelModal ()
 Finishes the modal loop and releases the focus.
sdpGtkCheckButton CheckButton (const std::string &ControlName)
sdpGtkCheckMenuItem CheckMenuItem (const std::string &ControlName)
sdpGtkCList CList (const std::string &ControlName)
virtual void CloseDialog ()
 Standard UI destruction (deletes this object).
sdpGtkColorSelection ColorSelection (const std::string &ControlName)
sdpGtkColorSelectionDialog ColorSelectionDialog (const std::string &ControlName)
sdpGtkCombo Combo (const std::string &ControlName)
const std::string command_node_name ()
 Returns the name of this command node.
const commands_t commands ()
 Returns the set of all valid commands for this node.
void ConnectAllEvents ()
 Connects all events to GTK+.
sdpGtkContainer Container (const std::string &ControlName)
virtual bool Create (sdpGtkIObjectContainer *const ObjectContainer, sdpxml::Document &Document, sdpxml::Element &Element)
 Called to create a Gtk+ widget when creating a UI from a GTKML (XML) document.
virtual void CreateChild (sdpGtkIObjectContainer *const ObjectContainer, sdpxml::Document &Document, sdpxml::Element &ChildElement)
 Called by CreateChildren for each child element to create child widgets from a GTKML (XML) document.
virtual bool CreateChildren (sdpGtkIObjectContainer *const ObjectContainer, sdpxml::Document &Document, sdpxml::Element &Element)
 Called after the Gtk+ widget has been created to create child widgets from a GTKML (XML) document.
virtual bool CreateOptions (sdpGtkIObjectContainer *const ObjectContainer, sdpxml::Document &Document, sdpxml::Element &Element)
 Called after the Gtk+ widget has been created to handle setting widget options from a GTKML (XML) document.
sdpGtkCTree CTree (const std::string &ControlName)
sdpGtkCurve Curve (const std::string &ControlName)
sdpGtkObjectCustomObject (const std::string &CustomObjectName)
 Returns a custom object by name.
virtual const std::string CustomType () const
 Returns the custom type of this object as a string.
sdpGtkData Data (const std::string &ControlName)
void DeleteEvent (sdpGtkEvent *Event)
 Deletes an event (the event must be explicitly disconnected by hand).
sdpGtkDialog Dialog (const std::string &ControlName)
void DisconnectAllEvents ()
 Disconnects all events from GTK+.
void DoModal (sdpGtkWindow &TransientOwner)
 Grabs the application focus and begins a modal loop.
void DoModal (GtkWindow *TransientOwner)
 Grabs the application focus and begins a modal loop.
void DoModal ()
 Grabs the application focus and begins a modal loop.
sdpGtkDrawingArea DrawingArea (const std::string &ControlName)
sdpGtkEditable Editable (const std::string &ControlName)
sdpGtkEntry Entry (const std::string &ControlName)
sdpGtkEventBox EventBox (const std::string &ControlName)
bool execute_command (const std::string &Command, const std::string &Arguments)
sdpGtkFileSelection FileSelection (const std::string &ControlName)
sdpGtkFixed Fixed (const std::string &ControlName)
sdpGtkFontSelection FontSelection (const std::string &ControlName)
sdpGtkFontSelectionDialog FontSelectionDialog (const std::string &ControlName)
sdpGtkFrame Frame (const std::string &ControlName)
sdpGtkGammaCurve GammaCurve (const std::string &ControlName)
gpointer GetData (SDPCSTRING Name)
 Returns a user-defined name-value pair.
sdpGtkHandleBox HandleBox (const std::string &ControlName)
sdpGtkHBox HBox (const std::string &ControlName)
sdpGtkHButtonBox HButtonBox (const std::string &ControlName)
sdpGtkHPaned HPaned (const std::string &ControlName)
sdpGtkHRuler HRuler (const std::string &ControlName)
sdpGtkHScale HScale (const std::string &ControlName)
sdpGtkHScrollbar HScrollbar (const std::string &ControlName)
sdpGtkHSeparator HSeparator (const std::string &ControlName)
sdpGtkImage Image (const std::string &ControlName)
sdpGtkInputDialog InputDialog (const std::string &ControlName)
bool InteractiveActivateButton (const std::string &Name, const gdouble Speed, const bool Pause)
 Interactively activate a button.
bool InteractiveActivateMenuItem (const std::string &Name, const gdouble Speed, const bool Pause)
 Interactively activate a menu item.
bool InteractiveHighlight (const std::string &Name, const gdouble Speed, const bool Pause)
 Interactively highlight a widget.
bool InteractiveMoveTo (const std::string &Name, const gdouble Speed, const bool Pause)
 Interactively move the mouse pointer to a control (and make sure it's visible).
bool InteractiveSetText (const std::string &Name, const std::string &Text, const gdouble Speed, const bool Pause)
 Interactively put text into a text control.
bool InteractiveShow (const std::string &Name, const gdouble Speed, const bool Pause)
 Interactively show a widget.
bool InteractiveToggleButton (const std::string &Name, const gdouble Speed, const bool Pause)
 Interactively activate a toggle-button.
bool IsModal ()
 Tests to see if the modal loop is active.
sdpGtkItem Item (const std::string &ControlName)
sdpGtkLabel Label (const std::string &ControlName)
sdpGtkList List (const std::string &ControlName)
sdpGtkListItem ListItem (const std::string &ControlName)
bool Load (sdpxml::Document &Document, const boost::filesystem::path &ReferencePath=boost::filesystem::path())
 Loads a GTKML file from an XML document.
sdpGtkEventMapEvent (const std::string &EventSignal, const std::string &EventName, const bool After, sdpGtkObject &Object, const bool Connect)
 Maps an event by name.
sdpGtkEventMapEvent (const std::string &EventSignal, const std::string &EventName, const bool After, sdpGtkObject *const Object, const bool Connect)
 Maps an event by name.
sdpGtkEventMapEvent (const std::string &EventSignal, const std::string &EventName, const bool After, GtkObject *const Object, const bool Connect)
 Maps an event by name.
sdpGtkMenu Menu (const std::string &ControlName)
sdpGtkMenuBar MenuBar (const std::string &ControlName)
sdpGtkMenuItem MenuItem (const std::string &ControlName)
sdpGtkMenuShell MenuShell (const std::string &ControlName)
sdpGtkMisc Misc (const std::string &ControlName)
sdpGtkNotebook Notebook (const std::string &ControlName)
GtkObject * Object () const
 Returns the GtkObject this instance is attached to.
sdpGtkObject Object (const std::string &ControlName)
 operator GtkObject * () const
 Casts this instance to a GtkObject.
sdpGtkOptionMenu OptionMenu (const std::string &ControlName)
sdpGtkPaned Paned (const std::string &ControlName)
sdpGtkPixmap Pixmap (const std::string &ControlName)
sdpGtkRange Range (const std::string &ControlName)
void RemoveData (SDPCSTRING Name)
 Deletes a user-defined name-value pair.
std::string Resource (const std::string &ResourceName, const std::string &DefaultValue)
 Returns a resource by name.
std::string Resource (const std::string &ResourceName)
 Returns a resource by name.
GtkObject * Root ()
 Returns the container's root object (the top-level object within a GTKML document).
sdpGtkAccelLabel RootAccelLabel ()
sdpGtkAdjustment RootAdjustment ()
sdpGtkAlignment RootAlignment ()
sdpGtkArrow RootArrow ()
sdpGtkAspectFrame RootAspectFrame ()
sdpGtkBin RootBin ()
sdpGtkBox RootBox ()
sdpGtkButton RootButton ()
sdpGtkButtonBox RootButtonBox ()
sdpGtkCalendar RootCalendar ()
sdpGtkCheckButton RootCheckButton ()
sdpGtkCheckMenuItem RootCheckMenuItem ()
sdpGtkCList RootCList ()
sdpGtkColorSelection RootColorSelection ()
sdpGtkColorSelectionDialog RootColorSelectionDialog ()
sdpGtkCombo RootCombo ()
sdpGtkContainer RootContainer ()
sdpGtkCTree RootCTree ()
sdpGtkCurve RootCurve ()
sdpGtkData RootData ()
sdpGtkDialog RootDialog ()
sdpGtkDrawingArea RootDrawingArea ()
sdpGtkEditable RootEditable ()
sdpGtkEntry RootEntry ()
sdpGtkEventBox RootEventBox ()
sdpGtkFileSelection RootFileSelection ()
sdpGtkFixed RootFixed ()
sdpGtkFontSelection RootFontSelection ()
sdpGtkFontSelectionDialog RootFontSelectionDialog ()
sdpGtkFrame RootFrame ()
sdpGtkGammaCurve RootGammaCurve ()
sdpGtkHandleBox RootHandleBox ()
sdpGtkHBox RootHBox ()
sdpGtkHButtonBox RootHButtonBox ()
sdpGtkHPaned RootHPaned ()
sdpGtkHRuler RootHRuler ()
sdpGtkHScale RootHScale ()
sdpGtkHScrollbar RootHScrollbar ()
sdpGtkHSeparator RootHSeparator ()
sdpGtkImage RootImage ()
sdpGtkInputDialog RootInputDialog ()
sdpGtkItem RootItem ()
sdpGtkLabel RootLabel ()
sdpGtkList RootList ()
sdpGtkListItem RootListItem ()
sdpGtkMenu RootMenu ()
sdpGtkMenuBar RootMenuBar ()
sdpGtkMenuItem RootMenuItem ()
sdpGtkMenuShell RootMenuShell ()
sdpGtkMisc RootMisc ()
sdpGtkNotebook RootNotebook ()
sdpGtkObject RootObject ()
sdpGtkOptionMenu RootOptionMenu ()
sdpGtkPaned RootPaned ()
sdpGtkPixmap RootPixmap ()
sdpGtkRange RootRange ()
sdpGtkScrollbar RootScrollbar ()
sdpGtkScrolledWindow RootScrolledWindow ()
sdpGtkSeparator RootSeparator ()
sdpGtkSpinButton RootSpinButton ()
sdpGtkStatusbar RootStatusbar ()
sdpGtkTable RootTable ()
sdpGtkTearoffMenuItem RootTearoffMenuItem ()
sdpGtkText RootText ()
sdpGtkTipsQuery RootTipsQuery ()
sdpGtkToggleButton RootToggleButton ()
sdpGtkToolbar RootToolbar ()
sdpGtkTooltips RootTooltips ()
sdpGtkTree RootTree ()
sdpGtkTreeItem RootTreeItem ()
sdpGtkVBox RootVBox ()
sdpGtkVButtonBox RootVButtonBox ()
sdpGtkViewport RootViewport ()
sdpGtkVPaned RootVPaned ()
sdpGtkVRuler RootVRuler ()
sdpGtkVScale RootVScale ()
sdpGtkVScrollbar RootVScrollbar ()
sdpGtkVSeparator RootVSeparator ()
sdpGtkWidget RootWidget ()
sdpGtkWindow RootWindow ()
sdpGtkScrollbar Scrollbar (const std::string &ControlName)
sdpGtkScrolledWindow ScrolledWindow (const std::string &ControlName)
sdpGtkSeparator Separator (const std::string &ControlName)
void SetData (SDPCSTRING Name, gpointer Value)
 Sets a user-defined name-value pair.
sdpGtkSpinButton SpinButton (const std::string &ControlName)
sdpGtkStatusbar Statusbar (const std::string &ControlName)
sdpGtkTable Table (const std::string &ControlName)
sdpGtkTearoffMenuItem TearoffMenuItem (const std::string &ControlName)
sdpGtkText Text (const std::string &ControlName)
sdpGtkTipsQuery TipsQuery (const std::string &ControlName)
sdpGtkToggleButton ToggleButton (const std::string &ControlName)
sdpGtkToolbar Toolbar (const std::string &ControlName)
sdpGtkTooltips Tooltips (const std::string &ControlName)
sdpGtkTree Tree (const std::string &ControlName)
sdpGtkTreeItem TreeItem (const std::string &ControlName)
void UnblockAllEvents ()
 Unblocks all object events.
sdpGtkVBox VBox (const std::string &ControlName)
sdpGtkVButtonBox VButtonBox (const std::string &ControlName)
sdpGtkViewport Viewport (const std::string &ControlName)
sdpGtkVPaned VPaned (const std::string &ControlName)
sdpGtkVRuler VRuler (const std::string &ControlName)
sdpGtkVScale VScale (const std::string &ControlName)
sdpGtkVScrollbar VScrollbar (const std::string &ControlName)
sdpGtkVSeparator VSeparator (const std::string &ControlName)
sdpGtkWidget Widget (const std::string &ControlName)
sdpGtkWindow Window (const std::string &ControlName)

Protected Member Functions

virtual void CallUpdateControls ()
 Called to cleanly refresh dialog controls (temporarily suspends event-handling).
void Clear ()
 Frees up all storage.
void ClearCustomObjects ()
 Frees "custom" objects.
void ClearEvents ()
 Frees event objects.
void ClearGroups ()
 Frees radio-button/radio menu item groups.
void ClearObjects ()
 Frees "normal" GTK+ objects.
bool connect_check_button (const std::string &Name, std::auto_ptr< k3d::check_button::idata_proxy > Data, k3d::istate_recorder *const StateRecorder, const std::string &StateChangeName)
 Connects a k3d::check_button::control to a data source.
bool connect_color_chooser (const std::string &Name, std::auto_ptr< k3d::color_chooser::idata_proxy > Data, k3d::istate_recorder *const StateRecorder, const std::string &StateChangeName)
 Connects a k3d::color_chooser::control to a data source.
bool connect_property_button (const std::string &Name, std::auto_ptr< k3d::property_button::idata_proxy > Data, k3d::istate_recorder *const StateRecorder, const std::string &StateChangeName)
 Connects a k3d::property_button::control to a data source.
bool connect_spin_button (const std::string &Name, std::auto_ptr< k3d::spin_button::idata_proxy > Data, k3d::istate_recorder *const StateRecorder, const std::string &StateChangeName)
 Connects a k3d::spin_button::control to a data source.
sdpGtkObjectCreateCustomObject (sdpxml::Element &Element)
 Allows us to instantiate UI elements using custom tags in the GTKML source document.
k3d::bitmap_preview::controlget_bitmap_preview (const std::string &Name)
k3d::button::control * get_button (const std::string &Name)
k3d::check_button::controlget_check_button (const std::string &Name)
k3d::chooser::controlget_chooser (const std::string &Name)
k3d::color_chooser::controlget_color_chooser (const std::string &Name)
k3d::combo_box::controlget_combo_box (const std::string &Name)
k3d::menu_item::control * get_menu_item (const std::string &Name)
k3d::object_chooser::controlget_object_chooser (const std::string &Name)
k3d::orientation::controlget_orientation_control (const std::string &Name)
k3d::path_chooser::controlget_path_chooser (const std::string &Name)
k3d::position::controlget_position_control (const std::string &Name)
k3d::property_button::controlget_property_button (const std::string &Name)
k3d::scale::controlget_scale_control (const std::string &Name)
k3d::spin_button::controlget_spin_button (const std::string &Name)
k3d::toggle_button::controlget_toggle_button (const std::string &Name)
GtkAccelGroup * GetAcceleratorGroup ()
 Return an accelerator group.
GSList * GetGroup (SDPCSTRING GroupName)
 Return a radio-button/radio-menu-item group by name.
GtkObject * GetObject (SDPCSTRING ObjectName)
 Return an object by name.
virtual bool LoadGTKMLTemplate (const boost::filesystem::path &Template)
 Called to load a GTKML template file (connects to some standard events).
virtual bool LoadGTKMLTemplate (std::istream &Stream, const std::string &StreamName)
 Called to load a GTKML template from a stream (connects to some standard events).
void MapCustomObject (SDPCSTRING CustomObjectName, sdpGtkObject *CustomObject)
 Ask the underlying container to map a name to a custom object.
void MapEvent (sdpxml::Document &Document, sdpxml::Element &Element, GtkObject *Object, bool Connect)
 Ask the underlying container to map a name to an event.
void MapGroup (SDPCSTRING GroupName, GSList *Group)
 Ask the underlying container to map a radio-button/radio-menu-item group by name.
void MapObject (SDPCSTRING ObjectName, GtkObject *Object)
 Ask the underlying container to map a name to an object.
void MapResource (SDPCSTRING ResourceName, SDPCSTRING ResourceValue)
 Ask the underlying container to map a name to a string resource.
void NotifyObject (GtkObject *Object)
 Notify the underlying container that an object has been created.
virtual void OnClose ()
virtual void OnDelete (sdpGtkEvent *Event)
 Called when the user hits the window manager "close" button.
void OnEvent (sdpGtkEvent *Event)
virtual void OnOK ()
const boost::filesystem::path reference_path ()
 Returns the reference path to be used for loading external objects (like pixmaps) at load-time.
void register_command (const std::string &Name, const std::string &Description, const command_t::type_t Type, const std::string &Command)
 Registers a command.
void restore_geometry ()
 Updates current window geometry (size & position) from the stored window_geometry_store object (if any).
void set_command_node_name (const std::string &Name)
 Sets the name of the command-node.
virtual void Show ()
 Called to make this dialog visible (also handles restoring saved window positions).
virtual void UpdateControls ()
 Does the work of updating controls when their underlying data changes.

Protected Attributes

GtkObject * m_Object
 Stores the GtkObject this instance is attached to.

Private Types

typedef k3dDialog base

Private Member Functions

void on_command (k3d::icommand_node *CommandNode, k3d::icommand_node::command_t::type_t Type, std::string Command, std::string Arguments)
 Called by the signal system as commands are emitted.

Private Attributes

boost::filesystem::path m_log_file
 Path to the output file stream during recording.
boost::filesystem::ofstream m_log_stream
 Output file stream during recording.
 Script engine for the script being recorded.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index