File: wxgolly.h

package info (click to toggle)
golly 3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 20,220 kB
  • sloc: cpp: 72,638; ansic: 25,919; python: 7,921; sh: 4,245; objc: 3,721; java: 2,781; xml: 1,362; makefile: 530; perl: 69
file content (48 lines) | stat: -rwxr-xr-x 1,426 bytes parent folder | download | duplicates (3)
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
42
43
44
45
46
47
48
// This file is part of Golly.
// See docs/License.html for the copyright notice.

#ifndef _WXGOLLY_H_
#define _WXGOLLY_H_

// need some forward declarations
class lifepoll;
class MainFrame;
class PatternView;
class StatusBar;

// Define our application class:

class GollyApp : public wxApp
{
public:
    // called on application startup
    virtual bool OnInit();
    
#ifdef __WXMAC__
    // called in response to an open-document event;
    // eg. when a file is dropped onto the app icon
    virtual void MacOpenFile(const wxString& fullPath);
#endif
    
    // put app icon in given frame
    void SetFrameIcon(wxFrame* frame);
    
    // event poller is used by non-wx modules to process events
    lifepoll* Poller();
    void PollerReset();
    void PollerInterrupt();
};

DECLARE_APP(GollyApp)            // so other files can use wxGetApp

// At the risk of offending C++ purists, we use some globals to simplify code:
// "mainptr->GetRect()" is more readable than "wxGetApp().GetMainFrame()->GetRect()".

extern MainFrame* mainptr;       // main window
extern PatternView* viewptr;     // current viewport window (possibly a tile)
extern PatternView* bigview;     // big viewport window (encloses all tiles)
extern StatusBar* statusptr;     // status bar window
extern wxStopWatch* stopwatch;   // global stopwatch (started in OnInit)
extern bool insideYield;         // processing an event via Yield()?

#endif