WT_Fill_Pattern Class Reference
[Rendition attributes]

#include <fillpat.h>

Inheritance diagram for WT_Fill_Pattern:

Inheritance graph
[legend]
Collaboration diagram for WT_Fill_Pattern:

Collaboration graph
[legend]
List of all members.

Detailed Description

Rendition attribute describing the current fill pattern.

See also:
WT_Rendition
FillPatterns.png

Suggested rendering of fill patterns

Examples:

WhipExamples/FillPattern.cpp.

Definition at line 37 of file fillpat.h.

Public Types

enum  WT_Pattern_ID {
  Illegal = 0, Solid, Checkerboard, Crosshatch,
  Diamonds, Horizontal_Bars, Slant_Left, Slant_Right,
  Square_Dots, Vertical_Bars, User_Defined, Count,
  Undefined = -1
}
 An enumeration of predefined fill patterns. More...

Public Member Functions

 WT_Fill_Pattern ()
 Constructs a WT_Fill_Pattern object.
 WT_Fill_Pattern (WT_Pattern_ID n)
 Constructs a WT_Fill_Pattern with the given ID.
 WT_Fill_Pattern (WT_Fill_Pattern const &pattern)
 Copy Constructor.
virtual ~WT_Fill_Pattern ()
void merge (WT_Fill_Pattern const &pattern)
 Copies the given pattern's WT_Pattern_Scale setting to this one.
WT_Pattern_ID pattern_id () const
 Returns the ID of this fill pattern, one of WT_Pattern_ID "enum WT_Pattern_ID".
WT_Pattern_Scale const & pattern_scale () const
 Returns the a read-only reference to the pattern scale option.
WT_Pattern_Scalepattern_scale ()
 Returns the a writable reference to the pattern scale option.
void set (WT_Pattern_ID id)
 Sets the fill pattern ID with the given one, one of enum WT_Pattern_ID.
 operator WT_Pattern_ID () const
 Returns the ID of this fill pattern, one of enum WT_Pattern_ID.
virtual WT_Fill_Patternoperator= (WT_Pattern_ID const &i)
 Assigns the given pattern's ID to this one.
virtual WT_Fill_Patternoperator= (const WT_Fill_Pattern &fill_pattern)
 Assigns the given pattern's ID to this one (copies its contents, includes the pattern scale.).
WT_Boolean operator== (WT_Pattern_ID const &id) const
 Returns WD_True if the given ID is equal to this pattern's ID, one of enum WT_Pattern_ID.
WT_Boolean operator== (WT_Fill_Pattern const &pattern) const
 Returns WD_True if the given pattern is equal to this one (compares ID and pattern scale.).
WT_Boolean operator!= (WT_Fill_Pattern const &pattern) const
 Returns WD_True if the given pattern is NOT equal to this one (compares ID and pattern scale.).
WT_ID object_id () const
 Returns the WT_ID for this object.
WT_Result materialize (WT_Opcode const &opcode, WT_File &file)
 Materializes the contents of the object from the file and the given opcode.
WT_Result process (WT_File &file)
 Calls the configured action handler for this object (passes in the file reference.).
WT_Result skip_operand (WT_Opcode const &opcode, WT_File &file)
 Causes the file reading to proceed to the end of this object.
WT_Result serialize (WT_File &file) const
 Forces the serialization of the object to the file.
WT_Result sync (WT_File &file) const
 Serializes the attribute out to the file, if necessary.
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_Fill_Pattern &item, WT_File &file)
 Provides a default action handler for this attribute (e.g. sets the current rendition's corresponding attribute.).

Protected Types

enum  
 Bit settings to identify which fill options are defined (currently only one option - pattern scale.).
enum  WT_Materialize_Stage

Protected Attributes

WT_Pattern_Scale m_pattern_scale
WT_Fill_Pattern::WT_Fill_Pattern_Option_Code m_optioncode
 Indicates the set of options active for this fill pattern.
WT_Pattern_ID m_id
WT_Unsigned_Integer16 m_fields_defined

Static Protected Attributes

static const char * m_names [Count]

Friends

class WT_Pattern_Scale
class WT_Rendition
class WT_W2D_Class_Factory
class WT_Opcode

Classes

struct  WT_Fill_Pattern_Option_Code
 Indicates the set of options active for this fill pattern. More...


Member Enumeration Documentation

enum WT_Fill_Pattern::WT_Pattern_ID
 

An enumeration of predefined fill patterns.

Enumerator:
Illegal  Not a pattern (the enum default.)
Solid  Solid filled.
Checkerboard  Checkerboard pattern.
Crosshatch  Crosshatched pattern.
Diamonds  Diamond pattern.
Horizontal_Bars  Pattern with horizontal bars.
Slant_Left  Pattern with lines slanting left.
Slant_Right  Pattern with lines slanting right.
Square_Dots  Pattern with square dots.
Vertical_Bars  Pattern with vertical bars.
User_Defined  RESERVED, currently no way to describe a user defined fill pattern.
Count  Not a pattern, equals the total number of patterns + 1
Undefined  Not a pattern.

Definition at line 47 of file fillpat.h.


Member Function Documentation

static WT_Result WT_Fill_Pattern::default_process WT_Fill_Pattern 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.

WT_Result WT_Fill_Pattern::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.

WT_Result WT_Fill_Pattern::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.

WT_Result WT_Fill_Pattern::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_Fill_Pattern::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.

WT_Result WT_Fill_Pattern::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:17 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5