k3d::iuser_interface Class Reference

Abstract interface to common graphical-user-interface operations for use by objects. More...

#include <iuser_interface.h>

Inheritance diagram for k3d::iuser_interface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void open_uri (const string_t &URI)=0
 Displays a URI in the user's preferred application.
virtual void message (const string_t &Message)=0
 Displays an informational message.
virtual void warning_message (const string_t &Message)=0
 Displays a warning message.
virtual void error_message (const string_t &Message)=0
 Displays an error message.
virtual uint_t query_message (const string_t &Message, const uint_t DefaultOption, const std::vector< string_t > &Options)=0
 Prompts the user to choose one of several options.
virtual void nag_message (const string_t &Type, const ustring &Message, const ustring &SecondaryMessage=ustring())=0
 Displays an informational "nag" message that users can choose to suppress.
virtual bool_t get_file_path (const ipath_property::mode_t Mode, const string_t &Type, const string_t &Prompt, const filesystem::path &OldPath, filesystem::path &Result)=0
 Prompts the user for a filepath, checking for old choices, and storing the current choice for reuse.
virtual bool_t show (iunknown &Object)=0
 Displays the given object using a graphical user interface.
virtual void synchronize ()=0
 Runs the user interface loop (if any) until it is synchronized with the current document state.
virtual sigc::connection get_timer (const double_t FrameRate, sigc::slot< void > Slot)=0
 Returns a connection to a signal that will be emitted at the requested frame rate (could return an empty connection, if the UI doesn't support timers).
virtual uint_t watch_path (const filesystem::path &Path, const sigc::slot< void > &Slot)=0
virtual void unwatch_path (const uint_t WatchID)=0
 Stop watching the given path.

Protected Member Functions

 iuser_interface ()
 iuser_interface (const iuser_interface &)
iuser_interfaceoperator= (const iuser_interface &)
virtual ~iuser_interface ()

Detailed Description

Abstract interface to common graphical-user-interface operations for use by objects.


Constructor & Destructor Documentation

k3d::iuser_interface::iuser_interface (  )  [inline, protected]
k3d::iuser_interface::iuser_interface ( const iuser_interface  )  [inline, protected]
virtual k3d::iuser_interface::~iuser_interface (  )  [inline, protected, virtual]

Member Function Documentation

virtual void k3d::iuser_interface::error_message ( const string_t Message  )  [pure virtual]
virtual bool_t k3d::iuser_interface::get_file_path ( const ipath_property::mode_t  Mode,
const string_t Type,
const string_t Prompt,
const filesystem::path OldPath,
filesystem::path Result 
) [pure virtual]

Prompts the user for a filepath, checking for old choices, and storing the current choice for reuse.

Parameters:
Prompt message to display in the file selection dialog
OldPath initial file path to display in the file selection dialog
Result returns the chosen file path
Returns:
true iff the user confirms the file path choice, false if they wish to cancel the pending operation

Implemented in module::ngui::user_interface, module::nui::user_interface, module::pyui::user_interface, and module::qtui::user_interface.

virtual sigc::connection k3d::iuser_interface::get_timer ( const double_t  FrameRate,
sigc::slot< void >  Slot 
) [pure virtual]

Returns a connection to a signal that will be emitted at the requested frame rate (could return an empty connection, if the UI doesn't support timers).

Implemented in module::ngui::user_interface, module::nui::user_interface, module::pyui::user_interface, and module::qtui::user_interface.

virtual void k3d::iuser_interface::message ( const string_t Message  )  [pure virtual]
virtual void k3d::iuser_interface::nag_message ( const string_t Type,
const ustring Message,
const ustring SecondaryMessage = ustring() 
) [pure virtual]

Displays an informational "nag" message that users can choose to suppress.

Implemented in module::ngui::user_interface, module::nui::user_interface, module::pyui::user_interface, and module::qtui::user_interface.

virtual void k3d::iuser_interface::open_uri ( const string_t URI  )  [pure virtual]

Displays a URI in the user's preferred application.

Implemented in module::ngui::user_interface, module::nui::user_interface, module::pyui::user_interface, and module::qtui::user_interface.

iuser_interface& k3d::iuser_interface::operator= ( const iuser_interface  )  [inline, protected]
virtual uint_t k3d::iuser_interface::query_message ( const string_t Message,
const uint_t  DefaultOption,
const std::vector< string_t > &  Options 
) [pure virtual]

Prompts the user to choose one of several options.

Parameters:
Message text to be displayed
DefaultOption one-based index of the option that is selected by default. If DefaultOption is 0, no option is selected by default.
Returns:
one-based index of the option selected by the user, or "0" if a choice was not made (e.g. user clicked WM "close" button)
virtual bool_t k3d::iuser_interface::show ( iunknown Object  )  [pure virtual]

Displays the given object using a graphical user interface.

virtual void k3d::iuser_interface::synchronize (  )  [pure virtual]

Runs the user interface loop (if any) until it is synchronized with the current document state.

Implemented in module::ngui::user_interface, module::nui::user_interface, module::pyui::user_interface, and module::qtui::user_interface.

Referenced by k3d::python::detail::do_named_action().

virtual void k3d::iuser_interface::unwatch_path ( const uint_t  WatchID  )  [pure virtual]
virtual void k3d::iuser_interface::warning_message ( const string_t Message  )  [pure virtual]
virtual uint_t k3d::iuser_interface::watch_path ( const filesystem::path Path,
const sigc::slot< void > &  Slot 
) [pure virtual]

Call a slot whenever given filesystem path is modified. Note that we are watching the path, not an inode, so it isn't an error to specify a path for a nonexistent file. The slot will be called when a file is created / modified / renamed / deleted at that location. Returns a nonzero watch identifier that is used to cancel the watch later-on, or 0 if there is an error or the implementation does not support path-watching.

Implemented in module::ngui::user_interface, module::nui::user_interface, module::pyui::user_interface, and module::qtui::user_interface.

Referenced by k3d::watched_path_property< value_t, name_policy_t >::on_path_changed().


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

Generated on Mon Mar 21 07:42:01 2011 for K-3D by doxygen 1.6.3