/*! \file layer.h
** \brief Layer Class Header
**
-** $Id: layer.h,v 1.2 2005/01/24 03:08:18 darco Exp $
+** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
{
friend class ValueNode;
friend class Context;
-
+
/*
-- ** -- T Y P E S -----------------------------------------------------------
*/
static void register_in_book(const BookEntry &);
static Book& book();
-
+
static bool subsys_init();
static bool subsys_stop();
//! \writeme
float z_depth_;
-
+
//! \writeme
mutable Time dirty_time_;
-
+
//! Contains the name of the group that this layer belongs to
String group_;
-
+
//! \writeme
sigc::connection parent_death_connect_;
-
+
/*
-- ** -- S I G N A L S -------------------------------------------------------
*/
private:
//! Status Changed
- sigc::signal<void> signal_status_changed_;
-
+ sigc::signal<void> signal_status_changed_;
+
//! Parameter changed
- sigc::signal<void,String> signal_param_changed_;
+ sigc::signal<void,String> signal_param_changed_;
//! Description Changed
- sigc::signal<void> signal_description_changed_;
+ sigc::signal<void> signal_description_changed_;
//! Moved
- sigc::signal<void, int, etl::handle<Canvas> > signal_moved_;
+ sigc::signal<void, int, etl::handle<Canvas> > signal_moved_;
- sigc::signal<void, String> signal_added_to_group_;
+ sigc::signal<void, String> signal_added_to_group_;
- sigc::signal<void, String> signal_removed_from_group_;
+ sigc::signal<void, String> signal_removed_from_group_;
/*
-- ** -- S I G N A L I N T E R F A C E -------------------------------------
public:
//! Status Changed
- sigc::signal<void>& signal_status_changed() { return signal_status_changed_; }
-
+ sigc::signal<void>& signal_status_changed() { return signal_status_changed_; }
+
//! Parameter changed
sigc::signal<void,String>& signal_param_changed() { return signal_param_changed_; }
//! Description Changed
- sigc::signal<void>& signal_description_changed() { return signal_description_changed_;}
+ sigc::signal<void>& signal_description_changed() { return signal_description_changed_;}
//! Moved
sigc::signal<void, int, etl::handle<Canvas> >& signal_moved() { return signal_moved_; }
- sigc::signal<void, String>& signal_added_to_group() { return signal_added_to_group_; }
+ sigc::signal<void, String>& signal_added_to_group() { return signal_added_to_group_; }
- sigc::signal<void, String>& signal_removed_from_group() { return signal_removed_from_group_; }
+ sigc::signal<void, String>& signal_removed_from_group() { return signal_removed_from_group_; }
/*
-- ** -- C O N S T R U C T O R S ---------------------------------------------
//! Adds this layer to the given layer group
void add_to_group(const String&);
-
+
//! Removes this layer from the given layer group
void remove_from_group(const String&);
-
+
//! Removes this layer from all layer groups
void remove_from_all_groups();
-
+
//! Gets the name of the group that this layer belongs to
String get_group()const;
- //! \todo writeme
+ //! writeme
//DynamicParamList &dynamic_param_list() { return dynamic_param_list_; }
//! \todo writeme
bool connect_dynamic_param(const String& param, etl::loose_handle<ValueNode>);
bool disconnect_dynamic_param(const String& param);
-
+
//! Enables the layer for rendering (Making it \em active)
void enable() { set_active(true); }
//! \writeme
void set_z_depth(float x) { z_depth_=x; }
-
+
//! Sets the Canvas that this Layer is a part of
void set_canvas(etl::loose_handle<Canvas> canvas);
-
+
//! Returns a handle to the Canvas to which this Layer belongs
etl::loose_handle<Canvas> get_canvas()const;
-
+
//! \writeme
const String& get_description()const { return description_; }
//! \writeme
void set_description(const String& x);
-
+
/*
-- ** -- V I R T U A L F U N C T I O N S -----------------------------------
*/
virtual Rect get_full_bounding_rect(Context context)const;
//! Returns a string containing the name of the Layer
- virtual String get_name()const;
+ virtual String get_name()const;
//! Returns a string containing the localized name of the Layer
virtual String get_local_name()const;
** \todo \a point should be of the type <tt>const Point \&</tt> */
virtual void set_time(Context context, Time time, const Point &point)const;
- //! Gets the color of the Canvas at \a point
+ //! Gets the color of the Canvas at \a pos
/*! \param context Context iterator refering to next Layer.
- ** \param point Point which indicates where the desired Color should come from
- ** \todo \a point should be of the type <tt>const Point \&</tt>
+ ** \param pos Point which indicates where the Color should come from
** \see Handle::get_color()
*/
- virtual Color get_color(Context context, const Point &point)const;
+ virtual Color get_color(Context context, const Point &pos)const;
//! Renders the Canvas to the given Surface in an accelerated manner
/*! \param context Context iterator refering to next Layer.
** \param surface Pointer to Surface to render to.
** \param quality The requested quality-level to render at.
- ** \param rend_desc The associated RendDesc.
- ** \param callback Pointer to callback object. May be NULL if there is no callback.
+ ** \param renddesc The associated RendDesc.
+ ** \param cb Pointer to callback object. May be NULL if there is no callback.
** \return \c true on success, \c false on failure
** \see Handle::accelerated_render()
*/
- virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &rend_desc, ProgressCallback *callback)const;
+ virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
//! Checks to see if a part of the layer is directly under \a point
/*! \param context Context iterator refering to next Layer.