ToolMap
Loading...
Searching...
No Matches
tmwindowposition.h
1/***************************************************************************
2 tmwindowposition.h
3 Save and load windows position
4 -------------------
5 copyright : (C) 2007 CREALP Lucien Schreiber
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17// comment doxygen
18
19#ifndef _TM_WINDOWS_POSITION_H_
20#define _TM_WINDOWS_POSITION_H_
21
22// For compilers that support precompilation, includes "wx/wx.h".
23#include <wx/wxprec.h>
24
25// Include wxWidgets' headers
26#ifndef WX_PRECOMP
27#include <wx/wx.h>
28#endif
29
30#include <wx/fileconf.h>
31#include <wx/tokenzr.h>
32
33class tmWindowPosition : public wxObject {
34 private:
35 wxSize m_OldScreenSize;
36
37 wxString WP_PositionToString(wxRect pos);
38
39 wxRect WP_StringToPosition(const wxString& posstring);
40
41 bool WP_SaveScreenSize();
42
43 bool WP_LoadScreenSize();
44
45 wxRect WP_GetActualScreenSize();
46
47 public:
49
51
52 bool LoadPosition(const wxString& wndname, wxRect& pos);
53
54 bool SavePosition(const wxString& wndname, wxRect pos);
55
56 bool SavePosition(const wxString& wndname, const wxString& postext);
57
58 bool LoadPosition(const wxString& wndname, wxString& postext);
59
60 bool SaveScreenPosition();
61
62 bool HasScreenChanged();
63
64 bool Intersects(wxRect wndpos, wxSize screensize);
65};
66
67#endif
Definition tmwindowposition.h:33