OSDN Git Service

Windows APIを実装部に隠蔽してみた。まだ不完全だが。
[wintimer/wintimer.git] / wintimer / 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 boost::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 boost::uint32_t show_flag = SW_SHOW,
18     bool fit_to_display = false,
19     float width = 180,
20     float height = 60
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 boost::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();
41     void create();
42     void show(boost::uint32_t show_flag);
43     void text(std::wstring& text);
44     void update();
45
46   private:
47     toplevel_window(const std::wstring& menu_name,const std::wstring& name,bool fit_to_display,float width = 180,float height = 100);
48     // 実装部
49     struct impl;
50     std::shared_ptr<impl> impl_;
51   };
52 }