SDXFrameWork  0.04
SDXFrameWork
 全て クラス ネームスペース 関数 変数 ページ
Window.h
1 #pragma once
2 #include<Multimedia/SDX.h>
3 
4 namespace SDX
5 {
7 class Window
9 {
10  friend class System;
11 
12 private:
13  bool isFullScreen = false;
14  int width;
15  int height;
16 
17  Window(){}
18 
19 public:
20 
21  WindowHandle handle = 0;
22 
23  static Window& Single()
24  {
25  static Window single;
26  return single;
27  }
28 
30  static bool SetFullScreen(bool フルスクリーンフラグ)
32  {
33  Single().isFullScreen = フルスクリーンフラグ;
34  #ifdef DXLIB
35  return !DxLib::ChangeWindowMode(!フルスクリーンフラグ);
36  #elif defined(SDL)
37  return false;
38  #endif
39  }
40 
42  static bool SetTitle(const char *タイトル名)
43  {
44  #ifdef DXLIB
45  return !DxLib::SetMainWindowText(タイトル名);
46  #elif defined(SDL)
47  return false;
48  #endif
49  }
50 
52  static bool SetIconID(int id)
53  {
54  #ifdef DXLIB
55  return !DxLib::SetWindowIconID(id);
56  #elif defined(SDL)
57  return false;
58  #endif
59  }
60 
62  static bool SetSizeChangeEnable(bool 拡大縮小可能フラグ)
63  {
64  #ifdef DXLIB
65  return !DxLib::SetWindowSizeChangeEnableFlag(拡大縮小可能フラグ);
66  #elif defined(SDL)
67  return false;
68  #endif
69  }
70 
72  static bool SetSize(int 幅,int 高さ )
73  {
74  #ifdef DXLIB
75  return !DxLib::SetWindowSize(幅, 高さ);
76  #elif defined(SDL)
77  return false;
78  #endif
79  }
80 
82  static int GetWidth()
83  {
84  return Single().width;
85  }
86 
88  static int GetHeight()
89  {
90  return Single().height;
91  }
92 };
93 }
static int GetWidth()
ウィンドウ幅の取得.
Definition: Window.h:82
static int GetHeight()
ウィンドウ高さの取得.
Definition: Window.h:88
static bool SetSizeChangeEnable(bool 拡大縮小可能フラグ)
ウィンドウの拡大縮小可否設定.
Definition: Window.h:62
static bool SetIconID(int id)
アイコンIDの設定.
Definition: Window.h:52
static bool SetTitle(const char *タイトル名)
ウィンドウタイトルを設定.
Definition: Window.h:42
static bool SetFullScreen(bool フルスクリーンフラグ)
スクリーンモードを設定する.
Definition: Window.h:31
static bool SetSize(int 幅, int 高さ)
ウィンドウサイズの設定.
Definition: Window.h:72