Game Develop Core: gd::EventsRenderingHelper Class Reference

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gd::EventsRenderingHelper Class Reference
Events Editor related classes

Provides tools to draw events using wxWidgets toolkit. More...

`#include <EventsRenderingHelper.h>`

## Public Member Functions

void | DrawNiceRectangle (wxDC &dc, const wxRect &rect) const
int | DrawConditionsList (std::vector< gd::Instruction > &conditions, wxDC &dc, int x, int y, int width, gd::BaseEvent *event, gd::EventsEditorItemsAreas &areas, gd::EventsEditorSelection &selection, const gd::Platform &platform)
| Draw the specified condition list. More...
int | DrawActionsList (std::vector< gd::Instruction > &actions, wxDC &dc, int x, int y, int width, gd::BaseEvent *event, gd::EventsEditorItemsAreas &areas, gd::EventsEditorSelection &selection, const gd::Platform &platform)
| Draw the specified action list. More...
unsigned int | GetRenderedConditionsListHeight (const std::vector< gd::Instruction > &conditions, int width, const gd::Platform &platform)
| Get the height taken by drawing a condition list. More...
unsigned int | GetRenderedActionsListHeight (const std::vector< gd::Instruction > &actions, int width, const gd::Platform &platform)
| Get the height taken by drawing a condition list. More...
unsigned int | GetConditionsColumnWidth () const
void | SetConditionsColumnWidth (unsigned int conditionsColumnWidth_)
wxPoint | DrawTextInArea (std::string text, wxDC &dc, wxRect rect, wxPoint point)
unsigned int | GetTextHeightInArea (const std::string &text, unsigned int widthAvailable)
int | DrawInstruction (gd::Instruction &instruction, const gd::InstructionMetadata &instructionMetadata, bool isCondition, wxDC &dc, wxPoint point, int freeWidth, gd::BaseEvent *event, gd::EventsEditorItemsAreas &areas, gd::EventsEditorSelection &selection)
void | SetFont (const wxFont &font)
const wxFont & | GetFont () const
wxFont & | GetFont ()
const wxFont & | GetNiceFont () const
wxFont & | GetNiceFont ()
const wxHtmlDCRenderer & | GetHTMLRenderer () const
wxHtmlDCRenderer & | GetHTMLRenderer ()
const wxBrush & | GetSelectedRectangleFillBrush () const
wxBrush & | GetSelectedRectangleFillBrush ()
const wxPen & | GetSelectedRectangleOutlinePen () const
wxPen & | GetSelectedRectangleOutlinePen ()
const wxBrush & | GetHighlightedRectangleFillBrush () const
wxBrush & | GetHighlightedRectangleFillBrush ()
const wxPen & | GetHighlightedRectangleOutlinePen () const
wxPen & | GetHighlightedRectangleOutlinePen ()
const wxPen & | GetConditionsRectangleOutlinePen () const
wxPen & | GetConditionsRectangleOutlinePen ()
const wxPen & | GetActionsRectangleOutlinePen () const
wxPen & | GetActionsRectangleOutlinePen ()
const wxBrush & | GetConditionsRectangleFillBrush () const
wxBrush & | GetConditionsRectangleFillBrush ()
const wxBrush & | GetActionsRectangleFillBrush () const
wxBrush & | GetActionsRectangleFillBrush ()
std::string | GetHTMLText (std::string text)

## Static Public Member Functions

static EventsRenderingHelper * | GetInstance ()
static void | DestroySingleton ()

## Public Attributes

wxColor | eventGradient1
wxColor | eventGradient2
wxColor | eventGradient3
wxColor | eventGradient4
wxColor | eventBorderColor
wxColor | eventConditionsGradient1
wxColor | eventConditionsGradient2
wxColor | eventConditionsGradient3
wxColor | eventConditionsGradient4
wxColor | eventConditionsBorderColor
wxColor | selectionColor
wxColor | disabledColor
wxColor | disabledColor2
int | instructionsListBorder
int | separationBetweenInstructions

## Detailed Description

Provides tools to draw events using wxWidgets toolkit.

Class providing default colors, fonts and drawing functions so as to render events using wxWidgets toolkit.

## Member Function Documentation

int gd::EventsRenderingHelper::DrawActionsList | ( | std::vector< gd::Instruction > & | actions,
|  | wxDC & | dc,
|  | int | x,
|  | int | y,
|  | int | width,
|  | gd::BaseEvent * | event,
|  | gd::EventsEditorItemsAreas & | areas,
|  | gd::EventsEditorSelection & | selection,
|  | const gd::Platform & | platform
| ) |  |

Draw the specified action list.

See Also
  gd::EventsRenderingHelper::DrawConditionsList

isCondition=

int gd::EventsRenderingHelper::DrawConditionsList | ( | std::vector< gd::Instruction > & | conditions,
|  | wxDC & | dc,
|  | int | x,
|  | int | y,
|  | int | width,
|  | gd::BaseEvent * | event,
|  | gd::EventsEditorItemsAreas & | areas,
|  | gd::EventsEditorSelection & | selection,
|  | const gd::Platform & | platform
| ) |  |

Draw the specified condition list.

Parameters

  conditions | Conditions to be rendered
  dc | wxWidgets DC to be used
  x | x position of the drawing
  y | y position of the drawing
  width | Width available for the drawing
  event | Event owning the condition list
  areas | EventsEditorItemsAreas object when drawn areas will be registered
  selection | EventsEditorSelection object providing information about selection
  platform | The platform currently used

Returns
  Height used for the drawing

isCondition=

int gd::EventsRenderingHelper::DrawInstruction | ( | gd::Instruction & | instruction,
|  | const gd::InstructionMetadata & | instructionMetadata,
|  | bool | isCondition,
|  | wxDC & | dc,
|  | wxPoint | point,
|  | int | freeWidth,
|  | gd::BaseEvent * | event,
|  | gd::EventsEditorItemsAreas & | areas,
|  | gd::EventsEditorSelection & | selection
| ) |  |

Draw a specific instruction

Parameters

  instruction | Instruction to be rendered
  instructionMetadata | Instruction metadata
  isCondition | true if the instruction is a condition
  dc | The wxWidgets DC to be used for rendering
  point | The drawing position
  freeWidth | Width available
  event | Event owning the condition list
  areas | EventsEditorItemsAreas object when drawn areas will be registered
  selection | EventsEditorSelection object providing information about selection

Returns
  Height used for the drawing

void gd::EventsRenderingHelper::DrawNiceRectangle | ( | wxDC & | dc,
|  | const wxRect & | rect
| ) |  | const

Draw a nice rectangle, often used as conditions background, on a wxDC.

wxPoint gd::EventsRenderingHelper::DrawTextInArea | ( | std::string | text,
|  | wxDC & | dc,
|  | wxRect | rect,
|  | wxPoint | point
| ) |  |

Draw a text in dc at point, without taking more than widthAvailable.

Returns
  X position of the last character and total height taken by the text

std::string gd::EventsRenderingHelper::GetHTMLText | ( | std::string | text) |  |

Make sure a text will be correctly display by replacing specials characters and inserting tags like
.

unsigned int gd::EventsRenderingHelper::GetRenderedActionsListHeight | ( | const std::vector< gd::Instruction > & | actions,
|  | int | width,
|  | const gd::Platform & | platform
| ) |  |

Get the height taken by drawing a condition list.

See Also
  gd::EventsRenderingHelper::GetRenderedConditionsListHeight

unsigned int gd::EventsRenderingHelper::GetRenderedConditionsListHeight | ( | const std::vector< gd::Instruction > & | conditions,
|  | int | width,
|  | const gd::Platform & | platform
| ) |  |

Get the height taken by drawing a condition list.

Parameters

  conditions | Conditions to be rendered
  width | Width available for the drawing
  platform | The platform currently used

Returns
  Height used for the drawing

unsigned int gd::EventsRenderingHelper::GetTextHeightInArea | ( | const std::string & | text,
|  | unsigned int | widthAvailable
| ) |  |

Returns
  Height taken by the text

void gd::EventsRenderingHelper::SetFont | ( | const wxFont & | font) |  |

Change font. Only use a fixed width font.

The documentation for this class was generated from the following files:

- EventsRenderingHelper.h
- EventsRenderingHelper.cpp