File: WManager.H

package info (click to toggle)
wmanager 0.2.1-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 352 kB
  • sloc: cpp: 530; sh: 140; makefile: 74
file content (96 lines) | stat: -rw-r--r-- 2,311 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// $RCSfile: WManager.H,v $
// Working part of WManager
//
//! author="$Author: M $"
//! revision="$Revision: 1.2 $"
//! date="$Date: 1999/11/14 15:28:36 $"
//! state="$State: Exp $"
//
//
// Copyright (C) 1999  M. Tessmer
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


#ifndef WManager_H
#define WManager_H


// SYSTEM INCLUDES /////////////////////////////////
#include <string>                                 // standard string class
#include <fstream>                                // file streams

// PROJECT INCLUDES ///////////////////////////////////////////////////////////
#include "Interface.H"


// LOCAL INCLUDES /////////////////////////////////////////////////////////////
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Browser.H>

//: wmanager base class
// It is simply the main app class.
class WManager {
public:
  
  //: Constructor
  WManager();
  
  //: Destructor
  ~WManager();

  //: Initialize the interface
  void 
  Init();

  //: Check commandline arguments
  //
  //! param: argc - No. of arguments
  //! param: argv - Array of arguments
  int
  CheckArguments(int    argc,
		 char** argv);

  //: Parse configuration file
  void
  ParseFile();

  //: Enter the Fltk run loop
  //
  //! param: argc - No. of arguments
  //! param: argv - Array of arguments
  void
  Run(int    argc,
      char** argv);
  
  
private:
  Interface* _Interface;
  std::string*    _ConfigurationFilename;

  void
  _ParseConfigurationFile(std::ifstream* filestream);

  void
  _TokenizeAndAddToBrowser(char* entry);

  char*
  _CutString(const char* str,
	     const char* sub);
};

#endif // WManager_H