OChess v0.0.2
Programmer's Manual
EditorCanvas Class Reference

Contains the moves editor for the currently opened game. More...

#include <EditorCanvas.hpp>

Inheritance diagram for EditorCanvas:

Public Member Functions

 EditorCanvas (wxFrame *parent, std::shared_ptr< Game > game)
 
void OnPaint (wxPaintEvent &event)
 
void MouseEvent (wxMouseEvent &event)
 
void DrawElement (const cgeditor::Element &e)
 
void HandleEvent (const cgeditor::Event &e)
 
void SetMoves (HalfMove *moves, HalfMove *current)
 
void ApplyPreferences ()
 

Private Member Functions

wxPoint Middle (cgeditor::Element e)
 Convenient fonction to center text. More...
 

Private Attributes

wxPaintDC * dc
 
wxBitmap hide_icon
 
Theme t
 
wxFont default_font
 
std::shared_ptr< Gamegame
 
wxColour color_scrollbar_bg
 
wxColour color_scrollbar
 
wxColour color_margin
 
wxColour color_comments_bg
 
wxColour color_current_move_bg
 
wxColour color_menu_item_bg
 

Detailed Description

Contains the moves editor for the currently opened game.

Member Function Documentation

◆ Middle()

wxPoint EditorCanvas::Middle ( cgeditor::Element  e)
private

Convenient fonction to center text.

Parameters
eElement to center
Returns
wxPoint The centered version of e according to wdWidget API

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