X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fttedit.h;h=7713a10481db7ea15e19ae04ae2ba901594f3768;hb=HEAD;hp=de526f880b9280cfef86516ac075aa4a93f860df;hpb=6d13a5166688e470590692eb91c3915ab332fe36;p=ttedit diff --git a/src/ttedit.h b/src/ttedit.h old mode 100755 new mode 100644 index de526f8..7713a10 --- a/src/ttedit.h +++ b/src/ttedit.h @@ -1,181 +1,27 @@ -// -// TTEDIT.H: Header file -// -// by James L. Hammons -// (C) 2005 Underground Software -// - -#ifndef __TTEDIT_H__ -#define __TTEDIT_H__ - -#include // So that whoever uses this can without having - // to pull in a bunch of references manually -#include "ttf.h" - -// Forward declarations - -class TTEditFrame; -class TTEditWindow; -class CharWindow; -class ToolWindow; - -// -// Class representing the entire Application -// -class TTEditApp: public wxApp -{ - public: - TTEditFrame * mainFrame; - CharWindow * charWin; - ToolWindow * toolPalette; - TTF font; - - bool OnInit(); - int OnExit(); -}; - -DECLARE_APP(TTEditApp) - -class TTEditFrame: public wxFrame -{ - private: - protected: - public: - TTEditApp & app; // Reference to the application object - // Subwindows for reference within the program. - TTEditWindow * mainWindow; - wxMenuBar * menuBar; - - // Constructor and destructor - TTEditFrame(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style); - ~TTEditFrame(void); - - void OnCloseWindow(wxCloseEvent &e); - - void OnOpen(wxCommandEvent &e); - void OnExit(wxCommandEvent &e); - void OnAbout(wxCommandEvent &e); -// void OnEasy(wxCommandEvent &event); -/// void OnMedium(wxCommandEvent &event); -// void OnDifficult(wxCommandEvent &event); - - DECLARE_EVENT_TABLE() -}; - -class TTEditWindow: public wxWindow -{ - private: - TTEditApp & app; // Reference to the application object - double scale; // Window scaling factor - int32 offsetX, offsetY; // Window offsets - - protected: - public: -// int field_width, field_height; -// int x_cell, y_cell; - wxBitmap * bmp; - wxPoint pt, ptOffset, ptPrevious; - - // Constructor and destructor - TTEditWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0); - ~TTEditWindow(void); - - void OnPaint(wxPaintEvent &e); - void OnMouseEvent(wxMouseEvent &e); -// void DrawField(wxDC *, int xc1, int yc1, int xc2, int yc2); -// void Refresh(int xc1, int yc1, int xc2, int yc2); -// void Uncover(int x, int y); -// void UpdateFieldSize(); - - protected: - wxPoint GetAdjustedMousePosition(wxMouseEvent &e); - wxPoint GetAdjustedClientPosition(wxCoord x, wxCoord y); - - DECLARE_EVENT_TABLE() -}; - -class CharWindow: public wxWindow -{ - private: - protected: - public: -// int field_width, field_height; -// int x_cell, y_cell; - wxBitmap * bmp; - - // Constructor and destructor - CharWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0); - ~CharWindow(void); - - void OnPaint(wxPaintEvent &e); - void OnMouseEvent(wxMouseEvent &e); -// void DrawField(wxDC *, int xc1, int yc1, int xc2, int yc2); -// void Refresh(int xc1, int yc1, int xc2, int yc2); -// void Uncover(int x, int y); -// void UpdateFieldSize(); - - DECLARE_EVENT_TABLE() -}; - -class ToolWindow: public wxFrame -//class ToolWindow: public wxWindow -{ - private: - protected: - public: - wxBitmap * bmp; - wxPoint sizeStamp, sizeTPBM; - int prevTool; - - // Constructor and destructor - ToolWindow(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style); -// ToolFrame(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style); -// ToolWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0); - ~ToolWindow(void); - - void OnPaint(wxPaintEvent &e); - void OnMouseEvent(wxMouseEvent &e); -// void DrawField(wxDC *, int xc1, int yc1, int xc2, int yc2); -// void Refresh(int xc1, int yc1, int xc2, int yc2); -// void Uncover(int x, int y); -// void UpdateFieldSize(); - int32 FindSelectedTool(void); - - DECLARE_EVENT_TABLE() -}; - -// Resource/control IDs -/* -#define IDI_ICON 0x01L // IDs same as in ttedit.asm -#define IDM_MENU 0x02L -#define IDA_ACCEL 0x03L -#define IDD_ABOUT 0x04L -#define IDR_TOOLBAR1 0x05L -#define IDB_TOOLBAR1 0x06L -#define IDB_TOOLPAL1 0x07L -#define IDC_CURSOR1 0x08L -#define IDC_CURSOR2 0x09L -#define IDC_CURSOR3 0x0AL -#define IDC_CURSOR4 0x0BL -#define IDC_CURSOR5 0x0CL -#define IDC_CURSOR6 0x0DL -#define IDC_CURSOR7 0x0EL -#define IDC_CURSOR8 0x0FL - -#define IDS_SYSMENU 0x010L -#define IDM_FILEMENU 0x011L -#define IDM_HELPMENU 0x012L - -#define IDM_NEW 0x020L -#define IDM_OPEN 0x021L -#define IDM_SAVE 0x022L -#define IDM_SAVEAS 0x023L -#define IDM_EXIT 0x024L -#define IDM_HELPTOPICS 0x025L -#define IDM_ABOUT 0x026L - -#define ID_TBLEFT 0x030L -#define ID_TBRIGHT 0x031L -#define ID_TBCHARWIN 0x032L */ - -#endif // __TTEDIT_H__ +// +// TTEDIT.H: Header file +// +// by James L. Hammons +// (C) 2009 Underground Software +// + +#ifndef __TTEDIT_H__ +#define __TTEDIT_H__ + +#include + +// Forward declarations +//class CharWindow; +//class MainWindow; + +class TTEdit: public QApplication +{ + public: + TTEdit(int & argc, char * argv[]); + + public: +// CharWindow * charWnd; +// MainWindow * mainWindow; +}; + +#endif // __TTEDIT_H__