// Text.H: Text nodes.

// This file has been generated using nodegen 0.5a.
// Restrict manual editing to the sections delimited by
// . the comments "utility includes" and "end of utility includes"
// . the comments "utility members" and "end of utility members"

#ifndef _Text_H_
#define _Text_H_

#include "xrml.H"
#include "Geometry.H"
#include "FontStyle.H"

// utility includes
// end of utility includes

namespace xrml {
#define TextTypeId 	"Text"
extern bool IsText(SFNode*);

class Text: public virtual SFNode, public Geometry {
private:
  //
  void clone_here(const Text&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    string_updated = 0x1,
    fontStyle_updated = 0x2,
    length_updated = 0x4,
    maxExtent_updated = 0x8 
  };
  
protected:
  // raw children nodes (can be PROTO) + synchronize methods:
  SFNode* 	_fontStyle;
  void 	synchronize_fontStyle(void);

public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  Text();
  Text(const Text&);
  Text& operator=(const Text&);
  virtual ~Text();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  MFString         	string;
  FontStyle*       	fontStyle;
  MFFloat          	length;
  SFFloat          	maxExtent;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_string(const MFString&);
  void             	set_fontStyle(SFNode*);
  void             	set_length(const MFFloat&);
  void             	set_maxExtent(const SFFloat&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_string(const MFString&);
  bool             	assign_fontStyle(SFNode*);
  bool             	assign_length(const MFFloat&);
  bool             	assign_maxExtent(const SFFloat&);
  
  // update status
  inline bool      	string_is_updated(void) { return (status & string_updated); }
  inline void      	string_clear_update(void) { status &= ~string_updated; }
  inline bool      	fontStyle_is_updated(void) { return (status & fontStyle_updated); }
  inline void      	fontStyle_clear_update(void) { status &= ~fontStyle_updated; }
  inline bool      	length_is_updated(void) { return (status & length_updated); }
  inline void      	length_clear_update(void) { status &= ~length_updated; }
  inline bool      	maxExtent_is_updated(void) { return (status & maxExtent_updated); }
  inline void      	maxExtent_clear_update(void) { status &= ~maxExtent_updated; }
  
  // utility members
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const Text& src) { }
  inline void util_destruct(void) { }
};

// end of utility members
} // namespace xrml
#endif /*_Text_H_*/
