/*
*/
// Windows Header Files:
-#include "sf_windows.h"
+#include "base_window.h"
+#include "taskbar.h"
namespace sf
{
/* このクラスは、create_toplevel_window 関数からのみ生成可能 */
struct toplevel_window : public base_window
{
+
friend toplevel_window_ptr create_toplevel_window
(
const std::wstring& menu_name,
const boost::uint32_t show_flag,
bool fit_to_display ,
float width ,
- float height
+ float height
);
- void main_loop();
-
- virtual void discard_device();
- virtual void create_device();
- virtual void create_device_independent_resources();
+ ~toplevel_window(){};
+
+ void * raw_handle();
+ void create();
+ void show(boost::uint32_t show_flag);
+ void text(std::wstring& text);
+ void update();
- protected:
- void render();
- toplevel_window(const std::wstring& menu_name,const std::wstring& name,bool fit_to_display,float width = 160,float height = 100);
- void create_window();
- public:
- ~toplevel_window();
- LRESULT toplevel_window::window_proc(HWND hwnd,boost::uint32_t message, WPARAM wParam, LPARAM lParam);
private:
- long wm_task_bar_create_;
- ITaskbarList3Ptr taskbar_list_;
- UINT timer_id_;
- static const int INTERVAL_SEC1 = 60 * 15;// 15分
- static const int INTERVAL_SEC2 = 30;// 30秒
-
- int result_time_;
- enum timer_status {
- active,
- sleep
- };
-
- ID2D1FactoryPtr factory_;
- ID2D1HwndRenderTargetPtr render_target_;
- IDWriteFactoryPtr write_factory_;
- IWICImagingFactoryPtr wic_imaging_factory_;
-
- timer_status status_;
- IDWriteTextFormatPtr write_text_format_;
- D2D1_RECT_F layout_rect_;
-
+ toplevel_window(const std::wstring& menu_name,const std::wstring& name,bool fit_to_display,float width = 180,float height = 100);
+ // 実装部
+ struct impl;
+ std::shared_ptr<impl> impl_;
};
-
-
-
}
\ No newline at end of file