WT_Viewport Class Reference
[Rendition attributes]

#include <viewport.h>

Inheritance diagram for WT_Viewport:

Inheritance graph
[legend]
Collaboration diagram for WT_Viewport:

Collaboration graph
[legend]
List of all members.

Detailed Description

Rendition attribute defining the current viewport receiving the subsequent graphics.

See also:
WT_Rendition
Examples:

WhipExamples/Viewport.cpp, and WhipExamples/WriteRedline.cpp.

Definition at line 41 of file viewport.h.

Public Member Functions

 WT_Viewport ()
 Constructs a WT_Viewport object.
 WT_Viewport (WT_Viewport const &vport) throw (WT_Result)
 Constructs a WT_Viewport object. Copy constructor.
 WT_Viewport (WT_File &file, char const *name, int num_points, WT_Logical_Point const *points, WT_Boolean copy=WD_True) throw (WT_Result)
 Constructs a WT_Viewport object with the given data.
 WT_Viewport (WT_File &file, WT_Unsigned_Integer16 const *name, int num_points, WT_Logical_Point const *points, WT_Boolean copy=WD_True) throw (WT_Result)
 Constructs a WT_Viewport object with the given data.
 WT_Viewport (WT_File &file, WT_String const &name, WT_Contour_Set const &boundary, WT_Boolean copy=WD_True) throw (WT_Result)
 Constructs a WT_Viewport object with the given data.
virtual ~WT_Viewport ()
 Destroys a WT_Viewport object.
WT_Contour_Set const * contour () const
 Returns the viewport boundary (as a contour set.).
WT_String const & name () const
 Returns the viewport name.
WT_Result set (WT_Viewport const &vport, WT_Boolean copy=WD_True)
 Copies the settings from the given viewport to this one.
void set (WT_String const &name)
 Sets the given data.
WT_Result set (WT_Contour_Set const *boundary, WT_Boolean copy=WD_True)
 Sets the given data.
WT_Viewport_Option_Viewport_Units
const & 
viewport_units () const
 Returns a read-only reference to the viewport units option object.
WT_Viewport_Option_Viewport_Unitsviewport_units ()
 Returns a writable reference to the viewport units option object.
virtual WT_Viewportoperator= (WT_Viewport const &vport)
 Assignment operator. Copies the settings from the given viewport to this one.
WT_ID object_id () const
 Returns the WT_ID for this object.
virtual WT_Result materialize (WT_Opcode const &opcode, WT_File &file)
 Materializes the contents of the object from the file and the given opcode.
virtual WT_Result process (WT_File &file)
 Calls the configured action handler for this object (passes in the file reference.).
virtual WT_Result skip_operand (WT_Opcode const &opcode, WT_File &file)
 Causes the file reading to proceed to the end of this object.
virtual WT_Result serialize (WT_File &file) const
 Forces the serialization of the object to the file.
virtual WT_Result sync (WT_File &file) const
 Serializes the attribute out to the file, if necessary.
virtual WT_Boolean operator== (WT_Attribute const &attrib) const
 Returns WD_True if the attributes are equal.

Static Public Member Functions

static WT_Result default_process (WT_Viewport &item, WT_File &file)
 Provides a default action handler for this attribute (e.g. sets the current rendition's corresponding attribute.).

Protected Types

enum  WT_Materialize_Stage
enum  WT_Viewport_Options

Protected Attributes

WT_Contour_Setm_contour_set
WT_Point_Setm_temp_point_set
WT_Opcodem_temp_opcode
WT_Unsigned_Integer16 m_fields_defined
WT_Viewport_Optioncode m_optioncode
WT_String m_name
int m_incarnation
WT_Viewport_Option_Viewport_Units m_viewport_units

Friends

class WT_Rendition
class WT_W2D_Class_Factory
class WT_Opcode


Member Function Documentation

static WT_Result WT_Viewport::default_process WT_Viewport item,
WT_File file
[static]
 

Provides a default action handler for this attribute (e.g. sets the current rendition's corresponding attribute.).

Warning:
This is used by the framework and should not be called by client code.
Parameters:
item  The attribute to process.
file  The file being read.

virtual WT_Result WT_Viewport::materialize WT_Opcode const &  opcode,
WT_File file
[virtual]
 

Materializes the contents of the object from the file and the given opcode.

Reads in the object data and causes the file reading to proceed to the end of this object.

Warning:
This is used by the framework and should not be called by client code.
Return values:
WT_Result::Success The operation was successful.
WT_Result::Opcode_Not_Valid_For_This_Object The object does not support the opcode type.
WT_Result::Internal_Error Something went very wrong.

Implements WT_Object.

virtual WT_Result WT_Viewport::process WT_File file  )  [virtual]
 

Calls the configured action handler for this object (passes in the file reference.).

Warning:
This is used by the framework and should not be called by client code.

Implements WT_Object.

virtual WT_Result WT_Viewport::serialize WT_File file  )  const [virtual]
 

Forces the serialization of the object to the file.

Warning:
This is used by the framework and should not be called by client code.
Return values:
WT_Result::Success The operation was successful.

Implements WT_Attribute.

WT_Result WT_Viewport::set WT_Contour_Set const *  boundary,
WT_Boolean  copy = WD_True
 

Sets the given data.

Parameters:
boundary  A contour set defining the viewport.
copy  Whether the points should be copied or if their addresses should be used directly from the array.

void WT_Viewport::set WT_String const &  name  ) 
 

Sets the given data.

Parameters:
name  the viewport name.

WT_Result WT_Viewport::set WT_Viewport const &  vport,
WT_Boolean  copy = WD_True
 

Copies the settings from the given viewport to this one.

Parameters:
vport  Source viewport.
copy  Whether the points should be copied or if their addresses should be used directly from the array.

virtual WT_Result WT_Viewport::skip_operand WT_Opcode const &  opcode,
WT_File file
[virtual]
 

Causes the file reading to proceed to the end of this object.

Warning:
This is used by the framework and should not be called by client code.
Bug:
Not all objects perform skip_operand() correctly; this is a known problem. For best results, if client code must use WT_File::get_next_object_shell() manually, it should also call the corresponding WT_Object::materialize() method to avoid this problem.
See also:
WT_File::get_next_object_shell(), WT_File_Heuristics::set_deferred_delete().

Reimplemented from WT_Object.

virtual WT_Result WT_Viewport::sync WT_File file  )  const [virtual]
 

Serializes the attribute out to the file, if necessary.

Only outputs relevant desired rendition changes to the file.

Warning:
This is used by the framework and should not be called by client code.
Return values:
WT_Result::Success The operation was successful.
See also:
WT_File::desired_rendition().

Implements WT_Attribute.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:28 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5