File: App.h

package info (click to toggle)
quickplot 0.8.6-1.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,548 kB
  • ctags: 1,019
  • sloc: cpp: 10,052; sh: 7,597; makefile: 176
file content (53 lines) | stat: -rw-r--r-- 1,283 bytes parent folder | download | duplicates (2)
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
49
50
51
52
53
/* Copyright (c) 1998, 1999, 2003, 2004  Lance Arsenault, (GNU GPL (v2+))
 */

class GraphConfig;
class MainWindow;

// There can only be one App per process.

class App : public Main, public std::list<MainWindow *>
{
public:

  bool isInvalid;

  void quit(void);

  
  // create a main window and add it to the list.
  void createMainWindow(void);
  void copyCurrentMainWindow(void);
  void destroyMainWindow(MainWindow *mainWindow);
  

 private:
  
  // parseArgs1() gets options that need to be parsed before others like
  // --verbose, options that cause this program to exit like --help,
  // and options that change the way the main window looks like
  // --no-buttons.  parseArgs1() returns non-zero on error.
  int parseArgs1(int argc, char **argv);

  // parseArgs2() returns non-zero on error.  parseArgs2 parses stuff to
  // open files and more.  parseArgs2 needs to be called after 
  int parseArgs2(int argc, char **argv);

  // used by createMainWindow() and copyCurrentMainWindow()
  void _createMainWindow(bool makeFirstGraph);

  FileSelection *fileSelection;
  
 public:

  App(int *argv, char ***argv);
  virtual ~App(void);
  

  void openDialog(void); // slot
  void openFile(const char *filename);

};

extern App *app;
extern MainWindow *currentMainWindow;