#include <mi32/grlayout.h>
Inheritance diagram for GRAPHICLAYOUT:

Public Types | |
| typedef ITEMLIST::CONST_ITERATOR | CONST_ITERATOR |
| typedef MILIST< ITEM * > | ITEMLIST |
| typedef ITEMLIST::ITERATOR | ITERATOR |
Public Member Functions | |
| int | AddHGuide (DOUBLE value) |
| void | AddItem (ITEM *item) |
| int | AddTextStyle (const NAMEDTEXTSTYLE &style) |
| int | AddVGuide (DOUBLE value) |
| CONST_ITERATOR | Begin () const |
| ITERATOR | Begin () |
| void | ComputeItemAttachments (const ITEM *item, DRECT2D &rect, ITEMPOSITION &newpos, const ITEM *&ItemAbove, bool bSnap=true) const |
| ERRVALUE | Copy (const GRAPHICLAYOUT &rhs) |
| int | DoLayout () |
| int | Draw (MGD::CONTEXT *gc, const DRECT2D *rect=0, const TRANSPARM *trans=0, double scale=1.0) |
| void | DrawItemHandles (MGD::CONTEXT *gc, const ITEMPOSITION &position, const DRECT2D &rect, const GRAPHICLAYOUT::ITEM *ItemAbove, const DPOINT2D &SelectedDelta, double scale=1.0) const |
| CONST_ITERATOR | End () const |
| ITERATOR | End () |
| const COLOR & | GetBackgroundColor () const |
| const LINESTYLE & | GetBorderStyle () const |
| bool | GetDrawBackground () const |
| bool | GetDrawBorder () const |
| bool | GetDrawDropShadow () const |
| const COLOR & | GetDropShadowColor () const |
| double | GetDropShadowDirection () const |
| double | GetDropShadowDistance () const |
| DOUBLE | GetHeight () const |
| DOUBLE | GetHGuide (int GuideNum) const |
| INT32 | GetHGuideFromLocation (const DPOINT2D &point, int tolerance=2) const |
| const ITEM * | GetItemFromLocation (const DPOINT2D &point) const |
| ITEM * | GetItemFromLocation (const DPOINT2D &point) |
| int | GetNumHGuides () const |
| int | GetNumTextStyles () const |
| int | GetNumVGuides () const |
| void | GetTextStyle (int num, NAMEDTEXTSTYLE &style) const |
| void | GetTextStyle (int num, TEXTSTYLE &style) const |
| const NAMEDTEXTSTYLE * | GetTextStyle (int num) const |
| const UNICODE * | GetTextStyleName (int num) const |
| void | GetTextStyles (std::vector< NAMEDTEXTSTYLE > &styles) |
| DOUBLE | GetVGuide (int GuideNum) const |
| INT32 | GetVGuideFromLocation (const DPOINT2D &point, int tolerance=2) const |
| DOUBLE | GetWidth () const |
| GRAPHICLAYOUT (const GRAPHICLAYOUT &rhs) | |
| GRAPHICLAYOUT () | |
| bool | IsLayoutNeeded () const |
| void | MoveItem (ITEM *item, const DRECT2D &location, bool bSnap) |
| void | MoveItem (ITEM *item, DOUBLE dx, DOUBLE dy, bool bSnap) |
| void | RedrawResume () |
| void | RedrawSuspend () |
| bool | RemoveHGuide (int GuideNum) |
| void | RemoveItem (ITEM *item) |
| bool | RemoveVGuide (int GuideNum) |
| virtual const SERIALIZER::ITEMDEF * | SerialGetItemDef (SERIALIZER &serializer) const |
| virtual const char * | SerialGetTagName () const |
| virtual ERRVALUE | SerialRead (SERIALIZER &serializer) |
| virtual ERRVALUE | SerialWrite (SERIALIZER &serializer, const char *itemname) const |
| void | SetBackgroundColor (const COLOR &color) |
| void | SetBorderStyle (const LINESTYLE &style) |
| void | SetDrawBackground (bool DrawBackground) |
| void | SetDrawBorder (bool DrawBorder) |
| void | SetDrawDropShadow (bool DrawDropShadow) |
| void | SetDropShadowColor (const COLOR &color) |
| void | SetDropShadowDirection (double angle) |
| void | SetDropShadowDistance (double distance) |
| void | SetHGuide (int GuideNum, DOUBLE value) |
| void | SetLayoutNeeded () |
| void | SetRedrawNeeded () |
| void | SetTextStyle (int num, const NAMEDTEXTSTYLE &style) |
| void | SetTextStyleName (int num, const UNICODE *name) |
| ERRVALUE | SetTextStyles (const std::vector< NAMEDTEXTSTYLE > &styles, const SIMPLE_ARRAY< INT32 > &trans) |
| ERRVALUE | SetTextStyles (const std::vector< NAMEDTEXTSTYLE > &styles) |
| void | SetVGuide (int GuideNum, DOUBLE value) |
| bool | UsesTransparency (const MGD::CONTEXT *gc=0) const |
| virtual | ~GRAPHICLAYOUT () |
Static Public Member Functions | |
| const SERIALIZER::ITEMDEF * | GetSerialItemDef () |
| void | InstallItemType (const char *name, int(*Construct)(GRAPHICLAYOUT &, ITEM **)) |
Private Member Functions | |
| void | DrawHandle (MGD::CONTEXT *gc, const DPOINT2D &GuideEnd, const DPOINT2D &ItemEnd, TRANSPARM *trans=0, double scale=1.0) const |
| void | Free () |
| GRAPHICLAYOUT & | operator= (const GRAPHICLAYOUT &rhs) |
| void | Redraw () |
| void | SortHGuides () |
| void | SortVGuides () |
Static Private Member Functions | |
| ERRVALUE | SerializerCB_Item (SERIALIZER &serializer, const SERIALIZER::ITEMDEF *itemdef, void *cbdata, SERIALIZER::ITEMDEF::ACTION action) |
| ERRVALUE | SerializerCB_NamedTextStyle (SERIALIZER &serializer, const SERIALIZER::ITEMDEF *itemdef, void *cbdata, SERIALIZER::ITEMDEF::ACTION action) |
Private Attributes | |
| bool | m_bDrawBackground |
| bool | m_bDrawBorder |
| bool | m_bDrawDropShadow |
| COLOR | m_BGColor |
| bool | m_bLayoutNeeded |
| LINESTYLE | m_BorderStyle |
| bool | m_bRedrawNeeded |
| COLOR | m_DropShadowColor |
| double | m_DropShadowDirection |
| double | m_DropShadowDistance |
| DRECT2D | m_Extents |
| DOUBLE * | m_HGuides |
| ITEMLIST | m_ItemList |
| INT32 | m_MaxGroup |
| UINT32 | m_NumHGuides |
| UINT32 | m_NumVGuides |
| OBSERVERMANAGER | m_Observers |
| UINT32 | m_RedrawSuspended |
| std::vector< NAMEDTEXTSTYLE > | m_TextStyle |
| DOUBLE * | m_VGuides |
Static Private Attributes | |
| SIMPLE_ARRAY< ITEMTYPE > | s_ItemTypes |
|
|
Definition at line 188 of file grlayout.h. |
|
|
Definition at line 186 of file grlayout.h. |
|
|
Definition at line 187 of file grlayout.h. |
|
|
#include <mi32/MILIST.h> Constructor.
|
|
|
Copy constructor.
|
|
|
Assignment operator private and unimplemented to prevent use Destructor.
|
|
|
Add a Horizontal Guide. Returns the new guide number or err < 0 |
|
|
Add an item to the layout. Once added, the item is "owned" by the layout and will be destroied by the layout's destructor. If the position of the item hasn't been set yet, a default postion will be computed. |
|
|
Add a named text style.
|
|
|
Add a Vertical Guide. Returns the new guide number or err < 0 |
|
|
Return const iterator to first item in layout.
Definition at line 993 of file grlayout.h. |
|
|
Return iterator to first item in layout.
Definition at line 987 of file grlayout.h. |
|
||||||||||||||||||||||||
|
Compute item attachments given a rectangle of where the item will go. If bSnap is true, then anything within 3 pixels of a guide will snap to the guide and the rectangle will be adjusted accordingly
|
|
|
|
|
|
Compute all item positions. If nothing has changed since the last layout, nothing is done. |
|
||||||||||||||||||||
|
Draw. If Rect is not 0, only draw things intersecting the rect |
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||
|
Draw "handles" showing item attachemts. (normally done while moving an item) SelectedDelta is the offset in output cordinates that selected items have been shifted. |
|
|
Return const iterator to compare to end of layout (0).
Definition at line 1070 of file grlayout.h. |
|
|
Return iterator to compare to end of layout (0).
Definition at line 1064 of file grlayout.h. |
|
|
Free the contents of the layout. Used by Copy and desturctor.
|
|
|
Definition at line 1080 of file grlayout.h. |
|
|
Definition at line 1075 of file grlayout.h. |
|
|
Control wether or not the legend background is filled.
Definition at line 1086 of file grlayout.h. |
|
|
Control wether or not a border is drawn around the legend Use SetBorderStyle() to set the style of the border.
Definition at line 1093 of file grlayout.h. |
|
|
Determine if DropShadow is on or off.
Definition at line 1099 of file grlayout.h. |
|
|
Get the color for the drop shadow.
Definition at line 1105 of file grlayout.h. |
|
|
Get the angle for the drop shadow (in radians).
Definition at line 1111 of file grlayout.h. |
|
|
Get distance for the drop shadow (in points).
Definition at line 1117 of file grlayout.h. |
|
|
Get the height of the content.
Definition at line 1131 of file grlayout.h. |
|
|
Return the value of a Horizontal Guide.
Definition at line 1123 of file grlayout.h. |
|
||||||||||||
|
Given an X/Y position, return the horizontal Guide number. Returns -1 if no guide at given location.
|
|
|
Const version of GetItemFromLocation().
|
|
|
Given an x/y position return the item at that location. Returns NULL if no item at that location. |
|
|
Get the number of Horizontal Guides.
Definition at line 1161 of file grlayout.h. |
|
|
Get the number of text styles.
Definition at line 1167 of file grlayout.h. |
|
|
Get the number of Vertical Guides.
Definition at line 1173 of file grlayout.h. |
|
|
Method for implementing SERIALIZABLE behaviour.
|
|
||||||||||||
|
Get a copy of a text style.
Definition at line 1196 of file grlayout.h. |
|
||||||||||||
|
Get a copy of a text style.
Definition at line 1187 of file grlayout.h. |
|
|
Get a text style (const*).
Definition at line 1179 of file grlayout.h. |
|
|
Get the name of a text style.
Definition at line 1206 of file grlayout.h. |
|
|
Get the list of text styles. Can't return a const SIMPLE_ARRAY<>& because they're not stored that way internally for serialization reasons. Definition at line 1216 of file grlayout.h. |
|
|
Return the value of a Vertical Guide.
Definition at line 1224 of file grlayout.h. |
|
||||||||||||
|
|
|
|
Get the width of the content.
Definition at line 1232 of file grlayout.h. |
|
||||||||||||
|
Install handler for an ITEMTYPE.
|
|
|
Definition at line 1237 of file grlayout.h. |
|
||||||||||||||||
|
Move an item to an absolute location.
|
|
||||||||||||||||||||
|
Move an item relative to its current position.
|
|
|
Assignment operator (private and inimplemented to prevent use) (Use Copy(), which can return an error if it needs to).
|
|
|
Inform all observers that they need to redraw.
|
|
|
Resume redraws. If anything has changd while redraws were suspended, it will redraw. See comments on RedrawSuspend() for more information. Notifies all observers Definition at line 1272 of file grlayout.h. |
|
|
Suspend redraws. RedrawSuspend()/RedrawResume() calls can be nested. If you plan to Suspend/Resume in the same function, you're better off creating an instance of a GRAPHICLAYOUT::SUSPENDREDRAW, which will automatically resume when it goes out of scope. Definition at line 1263 of file grlayout.h. |
|
|
Remove a Horizontal Guide. Will not allow the removal of a guide which is in use. Will return true if the guide was removed, false if it was in use or an invalid guide number. |
|
|
Removes an item from the layout. Does not free the item. Once removed from the layout, it is your responsibility to destroy the item. Any items which are in the layout at the time the layout is destroied will get destroied by the layout's destructor. |
|
|
Remove a Vertical Guide. Will not allow the removal of a guide which is in use. Will return true if the guide was removed, false if it was in use or an invalid guide number. |
|
|
Method for implementing SERIALIZABLE behaviour.
|
|
|
Method for implementing SERIALIZABLE behaviour.
Definition at line 1311 of file grlayout.h. |
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
|
Method for implementing SERIALIZABLE behaviour.
Implements SERIALIZABLE. |
|
||||||||||||
|
Method for implementing SERIALIZABLE behaviour.
Implements SERIALIZABLE. |
|
|
Definition at line 1327 of file grlayout.h. |
|
|
Set the style of the border to draw around the legend. Use SetDrawBorder() to control wether or not this is used. Definition at line 1336 of file grlayout.h. |
|
|
Control wether or not the background is filled.
Definition at line 1344 of file grlayout.h. |
|
|
Control wether or not a border is drawn around the legend Use SetBorderStyle() to set the style of the border.
Definition at line 1353 of file grlayout.h. |
|
|
Control wether or not a drop shadow is drawn around the legend Use SetDropShadowXxxx() to set the shadow parameters.
Definition at line 1362 of file grlayout.h. |
|
|
Set the color for the drop shadow.
Definition at line 1370 of file grlayout.h. |
|
|
Set the angle for the drop shadow (in radians). GUI should provide intuitive way to set this. Definition at line 1379 of file grlayout.h. |
|
|
Set the distance for the drop shadow (in points). GUI should provide intuitive way to set this. Definition at line 1388 of file grlayout.h. |
|
||||||||||||
|
Set the value of a horizontal guide.
|
|
|
Sets the flag indicating that layout needs to be recomputed. XXX This could be made private. Inform observers if not suspended Definition at line 1403 of file grlayout.h. |
|
|
Sets the flag indicating that layout needs to be redrawn but not necessarly layout recomputed. Used when all was changed was color and things that don't effect size. Inform observers if not suspended Definition at line 1412 of file grlayout.h. |
|
||||||||||||
|
Set a text style.
|
|
||||||||||||
|
Set the name of a text style.
Definition at line 1433 of file grlayout.h. |
|
||||||||||||
|
Set the text styles, but allow for possibility of style reordering. The trans parameter is an array of INT32's that map old style number to new style number. The size of this array should match the number of styles that are in the layout before the call. If a style has been deleted, it's entry in the array should be -1. |
|
|
Set the text styles.
|
|
||||||||||||
|
Set the value of a vertical guide.
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 1505 of file grlayout.h. |
|
|
Definition at line 1506 of file grlayout.h. |
|
|
Definition at line 1507 of file grlayout.h. |
|
|
Definition at line 1509 of file grlayout.h. |
|
|
Definition at line 1494 of file grlayout.h. |
|
|
Definition at line 1504 of file grlayout.h. |
|
|
Definition at line 1495 of file grlayout.h. |
|
|
Definition at line 1508 of file grlayout.h. |
|
|