The HUtilityAnnotation class defines and manages annotations. More...
#include <HUtilityAnnotation.h>
Public Member Functions | |
virtual void | AddChar (char the_char) |
virtual void | AddChar (unsigned short the_char) |
virtual HC_KEY | GetBackgroundSegmentKey () |
virtual HPoint | GetFacing () const |
virtual HC_KEY | GetKey () |
virtual bool | GetOnTop () |
virtual void | GetText (char *text, int &length) |
virtual int | GetTextLength () |
virtual void | GetTextWithEncoding (unsigned short *text, int &length) |
virtual char const * | GetType () |
virtual HPoint | GetUp () const |
virtual HC_KEY | Insert (HPoint target, HPoint position, HC_KEY AnnotateThis, HBaseView *pView, HC_KEY layer_key=INVALID_KEY, int bg_type=BG_QUAD, bool useArrow=true, HC_KEY *key_path=(HC_KEY *) 0, int key_path_length=0) |
virtual HC_KEY | Insert (const char *text, HPoint target, HPoint position, HC_KEY AnnotateThis, HBaseView *pView, HC_KEY layer_key=INVALID_KEY, int bg_type=BG_QUAD, bool useArrow=true, HC_KEY *key_path=(HC_KEY *) 0, int key_path_length=0) |
virtual HC_KEY | InsertWithEncoding (const unsigned short *text, HPoint target, HPoint position, HC_KEY AnnotateThis, HBaseView *pView, HC_KEY layer_key=INVALID_KEY, int bg_type=BG_QUAD, bool useArrow=true, HC_KEY *key_path=(HC_KEY *) 0, int key_path_length=0) |
virtual void | MoveText (HPoint const &pos, HCamera const *camera=0) |
virtual void | MoveText (HPoint const &tar, HPoint const &pos, HCamera const *camera=0) |
virtual void | Resize (int include_count, HC_KEY include_keys[], HC_KEY view_key) |
virtual void | Resize (HC_KEY include_keys, HC_KEY view_key) |
virtual void | SetBackgroundType (long type) |
virtual void | SetColor (char const *color) |
virtual void | SetEdgeWeight (float weight) |
virtual void | SetExtents (int xpixels, int ypixels, HC_KEY view_key) |
virtual void | SetFacePattern (char const *pattern) |
virtual void | SetLinePattern (char const *pattern) |
virtual void | SetLineWeight (float weight) |
virtual void | SetNote (HC_KEY noteskey, HC_KEY view_key) |
virtual void | SetNote (HC_KEY noteskey, HBaseView *pView) |
virtual void | SetOnTop (bool t) |
virtual void | SetText (char const *text) |
virtual void | SetTextFont (char const *font) |
virtual void | SetTextWithEncoding (unsigned short const *text) |
virtual void | ShowPosition (HPoint &p) |
virtual void | ShowPosition (float *x, float *y, float *z) |
virtual void | ShowTarget (HPoint &p) |
virtual void | ShowTarget (float *x, float *y, float *z) |
virtual void | UnSetExtents () |
Static Public Member Functions | |
static void | ChangeAllFonts (HBaseView *view, char const *const font, HC_KEY seg_key=INVALID_KEY) |
static void | drawLineCallback (HIC_Rendition const *rendition, int count, HIC_DC_Point p[]) |
static void | drawLineCallbackClip (HIC_Rendition const *rendition, int count, HIC_DC_Point p[]) |
static void | drawMarkerCallback (HIC_Rendition const *rendition, HIC_DC_Point *p) |
static HC_KEY | GetKey (HC_KEY) |
static bool | IsAnnotation (HC_KEY key) |
static bool | IsNote (HC_KEY noteskey) |
static void | recursive_resize (HC_KEY seg_key, int include_count, HC_KEY include_keys[], HC_KEY view_key) |
static void | WindowResizeCallback (int signal, void *signal_data, void *user_data) |
Protected Attributes | |
HC_KEY | m_MyKey |
HC_KEY | m_MyTextKey |
HPoint | m_position |
HPoint | m_target |
Static Protected Attributes | |
static int | g_height |
static HC_KEY | g_segmentkey |
static int | g_width |
The HUtilityAnnotation class defines and manages annotations.
This class simplified the creation of annotations.
|
virtual |
Adds a char to the note
|
virtual |
Adds a unicode char to the note
|
static |
Change the font on all annotations in the s
|
virtual |
Returns a key to the background segment. In the segment a user-defined background can be set. Assume the text will range from x=[-1, 1] y=[-1, 1] and the background will be scaled to fit the text
|
inlinevirtual |
Returns the key to the root of the note sub-tree
References HC_KEY.
Returns the key to the root of the note sub-tree giving a key in that subtree.
|
virtual |
This return if the note on top of "normal" geometry
|
virtual |
Fills text with the current note text
text | a pointer to where the text should be written (may be null) |
length | return values for how much text was put in the buffer |
|
virtual |
Returns just the length of the text
|
virtual |
Fills text with the current note text
text | a pointer to where the text should be written (may be null) |
length | return values for how much text was put in the buffer |
|
inlinevirtual |
Returns "HUtilityAnnotation"
Reimplemented in HUtilityAnnotationMeasure.
|
virtual |
Inserts a note
target | where the arrow should point |
position | where the text is positioned |
AnnotateThis | key to what this annotation is annotating |
pView | pointer to the view |
layer_key | style segment for this note |
bg_type | one of four stock background types |
useArrow | sets the visibility of the arrow |
key_path | is the key path returned by HC_Show_Selection_Original_Keys |
key_path_length | is the length returned by HC_Show_Selection_Original_Keys |
Reimplemented in HUtilityAnnotationMeasure.
|
virtual |
Inserts a note
text | initial text for this note |
target | where the arrow should point |
position | where the text is positioned |
AnnotateThis | key to what this annotation is annotating |
pView | pointer to the view |
layer_key | style segment for this note |
bg_type | one of four stock background types |
useArrow | sets the visibility of the arrow |
key_path | is the key path returned by HC_Show_Selection_Original_Keys |
key_path_length | is the length returned by HC_Show_Selection_Original_Keys |
Reimplemented in HUtilityAnnotationMeasure.
|
virtual |
Inserts a note
text | initial text for this note |
target | where the arrow should point |
position | where the text is positioned |
AnnotateThis | key to what this annotation is annotating |
pView | pointer to the view |
layer_key | style segment for this note |
bg_type | one of four stock background types |
useArrow | sets the visibility of the arrow |
key_path | is the key path returned by HC_Show_Selection_Original_Keys |
key_path_length | is the length returned by HC_Show_Selection_Original_Keys |
Reimplemented in HUtilityAnnotationMeasure.
|
static |
Returns true if the key is an Annotation object (also returns true for objects deriving from this class. If this function returns try on this key, SetNote may be called on this key to do some limited things to that note such as changing the text and calling update.
|
static |
Returns true if noteskey refers to a note of this type. This key can then be passed to SetNote()
|
virtual |
Repositions the text
|
virtual |
Repositions the text and target.
|
static |
This method is normally called from WindowResizeCallback, but it can also get called by user code where there's no real view (such is in two pass printing).
|
virtual |
This must be called after a note is modified and before the scene is updated. This method updates the size of the background and fits it to the text. If you're note aren't looking like you expect, you may be forgetting to update the notes with this method.
|
virtual |
Sets the background type to one of the four predefined types
type | can be 0, 1, 2, 3 or BG_CIRCLE, BG_QUAD, BG_CLOUD, BG_NONE |
|
virtual |
sets the color at the root of the note segment tree
color | can be anything that HC_Set_Color accepts |
|
virtual |
Sets the edge weight at the root of the note segment tree
|
virtual |
Sets the extents of the background. The text will be scaled to fit within these extents
|
virtual |
Sets the face pattern at the root of the note segment tree
pattern | can be anything that HC_Set_Face_Pattern accepts |
|
virtual |
Sets the line pattern at the root of the note segment tree
pattern | can be anything that HC_Set_Line_Pattern accepts |
|
virtual |
Sets the line weight at the root of the note segment tree
Changes the note the class refers to
noteskey | should be a key that IsNote returns true on and is the key to the note we want this class to refer to and manipulate |
view_key | The view key where a camera can be found by compute text extents |
Changes the note the class refers to
noteskey | should be a key that IsNote returns true on and is the key to the note we want this class to refer to and manipulate |
pView | The view where a camera can be found by compute text extents |
Reimplemented in HUtilityAnnotationMeasure.
|
virtual |
Sets this note on top of "normal" geometry
t | if true, the note will be on top, false will unset the note as on top. |
|
virtual |
Sets the text of this note
|
virtual |
Sets the font for this note. If no font is set the font is inherited from it's parent.
font | is anything that is accepted by HC_Set_Text_Font Setting points or pixels may result in incorrectly sized text when printing. |
|
virtual |
Sets unicode text for this note
|
virtual |
Returns the position of the text in world space
|
virtual |
Returns the position of the text in world space
|
virtual |
Shows the target point in world space. The target point is the point that this note is annotating
|
virtual |
Shows the target point in world space. The target point is the point that this note is annotating
|
virtual |
Unsets the extents set on this note if an extent is set.
|
static |
This method is registered to listen for window resize events. If the window is resized the all annotations with points or pixel sized fonts must be updated