#ifndef __MAIN_G__
#define __MAIN_G__

#include "wx/frame.h"
#include "wx/pmf/lseditor.h"

// Define a new application type, each program should derive a class from wxApp
class MyApp : public wxApp
{
public:
    // override base class virtuals
    // ----------------------------

    // this one is called on application startup and is a good place for the app
    // initialization (doing it here and not in the ctor allows to have an error
    // return: if OnInit() returns false, the application terminates)
    virtual bool OnInit();
};

// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
public:
    // ctor(s)
    MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);

    // event handlers (these functions should _not_ be virtual)
    void OnPaint(wxPaintEvent& event)
    {
        wxPaintDC dc(this);
        dc.DrawRectangle(20, 20, 100, 100);
        dc.SetPen(*wxRED_PEN);
        dc.SetDeviceOrigin(20, 20);
        dc.SetClippingRegion(0, 0, 100, 100);
        dc.DrawLine(0, 0, 1000, 1000);
    }

    void OnQuit(wxCommandEvent& event);
    void OnAbout(wxCommandEvent& event);

private:
    // any class wishing to process wxWindows events must use this macro
    DECLARE_EVENT_TABLE()

protected:
	wxTextEditorView* mpView;
	wxTextEditorModel* mpModel;
};

// IDs for the controls and the menu commands
enum
{
    // menu items
    Minimal_Quit = 1,
    Minimal_About
};

#endif // __MAIN_G__