blob: 7eaf419aefab388a559232701ef49994e4093d74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#pragma once
#include "Workspace.h"
#include <wx/graphics.h>
//#include <wx/dcclient.h>
#include <wx/dcbuffer.h>
/**
* @brief A Workspace class that draws using Device Context.
*/
class WorkspaceDC : public Workspace
{
public:
/**
* @brief Default constructor
*/
WorkspaceDC();
/**
* @brief WorkspaceDC constructor
* @param parent Parent window
* @param name Project name (displayed at the tabs)
* @param statusBar Status bar to show useful info
* @return
*/
WorkspaceDC(wxWindow* parent, wxString name = wxEmptyString, wxStatusBar* statusBar = nullptr);
~WorkspaceDC();
/**
* @brief Redraws the screen
*/
virtual void Redraw() { this->Refresh(); }
/**
* @brief Get shared OpenGL context. This method prevents to share any OpenGL context when use DC.
* @return Aways nullptr
*/
virtual wxGLContext* GetSharedGLContext() const { return nullptr; } // Prevent share any OpenGL context when use DC
protected:
virtual void OnPaint(wxPaintEvent& event);
virtual void OnIdle(wxIdleEvent& event) {} // Prevent OpenGL checks
};
|