• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/amule/wxWidgets-2.8.12/contrib/samples/ogl/ogledit/
1/////////////////////////////////////////////////////////////////////////////
2// Name:        contrib/samples/ogl/ogledit/ogledit.h
3// Purpose:     OGL sample
4// Author:      Julian Smart
5// Modified by:
6// Created:     12/07/98
7// RCS-ID:      $Id: ogledit.h 37440 2006-02-10 11:59:52Z ABX $
8// Copyright:   (c) Julian Smart
9// Licence:     wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _OGLSAMPLE_OGLEDIT_H_
13#define _OGLSAMPLE_OGLEDIT_H_
14
15#include "wx/docview.h"
16#include "wx/ogl/ogl.h" // base header of OGL, includes and adjusts wx/deprecated/setup.h
17
18// Define a new application
19class MyFrame;
20class EditorToolPalette;
21class MyApp: public wxApp
22{
23  public:
24    MyFrame *frame;
25    wxDocManager* myDocManager;
26
27    MyApp(void);
28    bool OnInit(void);
29    int OnExit(void);
30
31    // Palette stuff
32    EditorToolPalette *CreatePalette(wxFrame *parent);
33};
34
35DECLARE_APP(MyApp)
36
37// Define a new frame
38class MyCanvas;
39class MyFrame: public wxDocParentFrame
40{
41    DECLARE_CLASS(MyFrame)
42public:
43    wxMenu *editMenu;
44
45    MyCanvas *canvas;
46    EditorToolPalette *palette;
47
48    MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title,
49            const wxPoint& pos = wxDefaultPosition,
50            const wxSize& size = wxDefaultSize,
51            long style = wxDEFAULT_FRAME_STYLE);
52
53    MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
54    void OnSize(wxSizeEvent& event);
55    void OnCloseWindow(wxCloseEvent& event);
56    void OnAbout(wxCommandEvent& event);
57
58DECLARE_EVENT_TABLE()
59};
60
61extern MyFrame *GetMainFrame(void);
62
63// Menu/undo/redo commands
64
65enum
66{
67    OGLEDIT_ADD_SHAPE = wxID_HIGHEST,
68    OGLEDIT_ADD_LINE,
69    OGLEDIT_EDIT_LABEL,
70    OGLEDIT_CHANGE_BACKGROUND_COLOUR,
71    OGLEDIT_ABOUT = wxID_ABOUT
72};
73
74#endif
75    // _OGLSAMPLE_OGLEDIT_H_
76