File: videooptions.h

package info (click to toggle)
qonk 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,076 kB
  • ctags: 2,026
  • sloc: cpp: 14,978; sh: 3,464; makefile: 200
file content (52 lines) | stat: -rw-r--r-- 1,208 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
// videooptions.h
//
// (c) Robert Schuster, 2007
//
// Licensed under GNU GPL version 2 or, at your option, any later version.

#ifndef VIDEOOPTIONS_H
#define VIDEOOPTIONS_H

#include <vector>

class Main;
class MenuAction;

/**
 * A VideoOptions object is to be modified through simple 'apply' (or invoke)
 * pattern methods. Those methods are provided through internal MenuAction
 * class of which object can be created for the menu system. The MenuAction
 * instances also update the graphical value representation.
 */
class VideoOptions
{
  bool fullscreen;

  int screenWidth, screenHeight;

  std::vector < std::pair < int, int > > sizes;
  int index;

  MenuAction *toggleFullscreenAction;
  MenuAction *screenSizeAction;
  MenuAction *applyVideoOptionsAction;

  public:
    VideoOptions();

    void previousScreenSize();
    void nextScreenSize();
    void toggleFullscreen();

    bool getFullscreen() const { return fullscreen; }
    int getScreenWidth() const { return screenWidth; }
    int getScreenHeight() const { return screenHeight; }
  
    MenuAction *getToggleFullscreenAction();

    MenuAction *getScreenSizeAction();

    MenuAction *getApplyVideoOptionsAction(Main &);
};

#endif