OSDN Git Service

be81cd34606111516244553f9bd0391faa82a2b2
[shooting3/dxgi_test.git] / dxgi_test / toplevel_window.h
1 #pragma once
2 /*
3 */
4 // Windows Header Files:
5 #include "base_window.h"
6 #include "taskbar.h"
7 namespace sf
8 {
9
10   struct toplevel_window;
11   typedef std::shared_ptr<toplevel_window> toplevel_window_ptr;
12
13   /** toplevel_window を生成する関数 */
14   toplevel_window_ptr create_toplevel_window (
15     const std::wstring& menu_name,
16     const std::wstring& name,
17     const uint32_t show_flag = SW_SHOW,
18     bool fit_to_display = false,
19     float width = 640,
20     float height = 480
21     );
22
23   /** toplevel ウィンドウクラス */
24   /* このクラスは、create_toplevel_window 関数からのみ生成可能 */
25   struct toplevel_window : public base_window
26   {
27
28     friend   toplevel_window_ptr create_toplevel_window
29       (
30       const std::wstring& menu_name,
31       const std::wstring& name,
32       const uint32_t show_flag,
33       bool fit_to_display ,
34       float width ,
35       float height 
36       );
37
38     ~toplevel_window(){};
39  
40     void * raw_handle() const;
41     void create();
42     void toplevel_window::show();
43     bool toplevel_window::is_show();
44     void toplevel_window::hide();
45
46     void text(std::wstring& text);
47     void update();
48
49   private:
50     struct impl;
51     toplevel_window(const std::wstring& menu_name,const std::wstring& name,bool fit_to_display,float width = 800 ,float height = 600);
52     // 実装部
53     std::shared_ptr<impl> impl_;
54   };
55 }