1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: bitmap.h
|
|
|
|
// Purpose: wxBitmap class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
2003-03-17 06:55:54 -05:00
|
|
|
// Copyright: (c) Julian Smart
|
2002-03-17 09:16:03 -05:00
|
|
|
// Licence: wxWindows license
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "wx/wx.h"
|
|
|
|
|
|
|
|
// Define a new application
|
|
|
|
class MyApp: public wxApp
|
|
|
|
{
|
|
|
|
public:
|
2004-10-06 16:54:57 -04:00
|
|
|
MyApp(void){};
|
1998-05-20 10:01:55 -04:00
|
|
|
bool OnInit(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
// Define a new frame
|
|
|
|
class MyCanvas;
|
|
|
|
|
|
|
|
class MyFrame: public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyCanvas *canvas;
|
|
|
|
MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size);
|
2002-03-17 09:16:03 -05:00
|
|
|
virtual ~MyFrame();
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
void OnActivate(bool) {}
|
|
|
|
void OnLoadFile(wxCommandEvent& event);
|
1998-09-03 17:46:47 -04:00
|
|
|
void OnSaveFile(wxCommandEvent& event);
|
1998-05-20 10:01:55 -04:00
|
|
|
void OnQuit(wxCommandEvent& event);
|
|
|
|
void OnAbout(wxCommandEvent& event);
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
// Define a new canvas which can receive some events
|
|
|
|
class MyCanvas: public wxScrolledWindow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
|
2004-10-06 16:54:57 -04:00
|
|
|
~MyCanvas(void){};
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
#define PNGDEMO_QUIT 100
|
|
|
|
#define PNGDEMO_ABOUT 101
|
|
|
|
#define PNGDEMO_LOAD_FILE 102
|
1998-09-03 17:46:47 -04:00
|
|
|
#define PNGDEMO_SAVE_FILE 103
|
1998-05-20 10:01:55 -04:00
|
|
|
|