File: Application.h

package info (click to toggle)
freeorion 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 194,940 kB
  • sloc: cpp: 186,508; python: 40,969; ansic: 1,164; xml: 719; makefile: 32; sh: 7
file content (31 lines) | stat: -rw-r--r-- 841 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
#ifndef Application_h
#define Application_h

#include <GG/Wnd.h>
#include <memory>


/// This class is designed to help you make GiGi
/// tests. You just create one of these,
/// and give it your test window and this takes care
/// of creating the application context where it can run happily.
class Application {
public:
    /// Create the app using command line options.
    /// An option database will be initialized from them.
    /// You need to register your options.
    Application(int argc, char** argv, unsigned width = 400, unsigned height = 300);
    ~Application();

    /// The given window will be made visible.
    /// Then the event pump is started.
    /// This method only returns once the application quits
    void Run(std::shared_ptr<GG::Wnd> wnd);

private:
    class Impl;
    std::unique_ptr<Impl> self;
};


#endif