NCBI C++ ToolKit
window_manager_service.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_FRAMEWORK___WINDOW_MANAGER_SERVICE__HPP
2 #define GUI_FRAMEWORK___WINDOW_MANAGER_SERVICE__HPP
3 
4 /* $Id: window_manager_service.hpp 35258 2016-04-18 01:35:40Z whlavina $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Andrey Yazhuk
30  *
31  * File Description:
32  *
33  */
34 
35 /** @addtogroup GUI_FRAMEWORK
36 *
37 * @{
38 */
39 
40 #include <corelib/ncbistd.hpp>
41 
42 #include <wx/gdicmn.h>
43 
44 class wxFrame;
45 
47 
48 class IWMClient;
49 class IWMClientFactory;
51 class CWindowManager;
52 class CDockLayoutTree;
53 
55  class CUser_object;
57 
58 ///////////////////////////////////////////////////////////////////////////////
59 /// IWindowManagerService
60 /// Window Manager Service provides access to Window Manager functionality.
61 
63 {
64 public:
65  typedef vector<IWMClient*> TClients;
66 
67 public:
69 
70  /// the service does not assume ownership of the given object
71  virtual void SetAdvisor(IWindowManagerAdvisor* advisor) = 0;
72 
73  /// places the given IWMClient in the Main Tabbed Pane in Window Manager
74  virtual void AddClient(IWMClient& client, bool bFloat) = 0;
75 
76  virtual wxFrame* MoveToFloatingFrame(IWMClient& client) = 0;
77 
78  /// remove client(s) from Window Manager
79  /// these functions do not disconnect clients from other services
80  virtual void CloseClient(IWMClient& client) = 0;
81  virtual void CloseClients(const TClients& clients) = 0;
82  virtual void CloseAllClients() = 0;
83 
84  /// returns a list of all registered IWMClients
85  virtual void GetAllClients(TClients& clients) = 0;
86 
87  /// returns Active client (i.e. client that has focus)
88  virtual IWMClient* GetActiveClient() = 0;
89 
90  /// makes client visible and focused
91  virtual void ActivateClient(IWMClient& client) = 0;
92 
93  /// makes clients visible, make the first client in the given container
94  /// focused
95  virtual void ActivateClients(TClients& clients) = 0;
96 
99 
100  /// Raise all floating windows to preserve/refresh z-order
101  virtual void RaiseFloatingWindowsInZOrder() = 0;
102 
103  /// Raise all floating windows if they overlap with the provided wxREct
104  virtual void RaiseFloatingWindowsInZOrder(wxRect r) = 0;
105 
106  /// Returns true if a drag operation is currently in progress
107  virtual bool IsDragging() const = 0;
108 
109  /// refresh client UI (title)
110  virtual void RefreshClient(IWMClient& client) = 0;
111 
112  virtual void ApplyLayout(const objects::CUser_object& layout) = 0;
113 
114  /// creates a new window layout based on description in the given
115  /// CUser_object creates clients using IWMClientFactory
116  virtual void LoadLayout(const objects::CUser_object& layout,
117  IWMClientFactory& factory) = 0;
118 
119  /// saves current window layout to CUser_object
120  virtual objects::CUser_object* SaveLayout() = 0;
121 
123 };
124 
125 
127 
128 /* @} */
129 
130 #endif // GUI_FRAMEWORK___WINDOW_MANAGER_SERVICE__HPP
131 
CDockLayoutTree - represents hierarchical layout in a Dock Container as a tree where nodes correspond...
Definition: dock_layout.hpp:64
CWindowManager - component controlling windowing of client windows.
IWMClientFactory - IWMClient factory.
Definition: wm_client.hpp:133
IWClient - abstract Window Manager client.
Definition: wm_client.hpp:50
IWindowManagerAdvisor.
IWindowManagerService Window Manager Service provides access to Window Manager functionality.
Include a standard set of the NCBI C++ Toolkit most basic headers.
virtual void RaiseFloatingWindowsInZOrder()=0
Raise all floating windows to preserve/refresh z-order.
virtual void CloseClients(const TClients &clients)=0
virtual void RaiseFloatingWindowsInZOrder(wxRect r)=0
Raise all floating windows if they overlap with the provided wxREct.
virtual void AddClient(IWMClient &client, bool bFloat)=0
places the given IWMClient in the Main Tabbed Pane in Window Manager
virtual void LoadLayout(const objects::CUser_object &layout, IWMClientFactory &factory)=0
creates a new window layout based on description in the given CUser_object creates clients using IWMC...
virtual CWindowManager * GetWindowManager()=0
virtual void ActivateClients(TClients &clients)=0
makes clients visible, make the first client in the given container focused
vector< IWMClient * > TClients
virtual void RefreshClient(IWMClient &client)=0
refresh client UI (title)
virtual void GetAllClients(TClients &clients)=0
returns a list of all registered IWMClients
virtual void CloseClient(IWMClient &client)=0
remove client(s) from Window Manager these functions do not disconnect clients from other services
virtual bool IsDragging() const =0
Returns true if a drag operation is currently in progress.
virtual void ApplyLayout(const objects::CUser_object &layout)=0
virtual IWMClient * GetActiveClient()=0
returns Active client (i.e. client that has focus)
virtual objects::CUser_object * SaveLayout()=0
saves current window layout to CUser_object
virtual void ActivateClient(IWMClient &client)=0
makes client visible and focused
virtual void UnRegisterActiveClient(IWMClient &client)=0
virtual void RegisterActiveClient(IWMClient &client)=0
virtual void CloseAllClients()=0
virtual void SetAdvisor(IWindowManagerAdvisor *advisor)=0
the service does not assume ownership of the given object
virtual wxFrame * MoveToFloatingFrame(IWMClient &client)=0
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
static CNamedPipeClient * client
Modified on Sun Jun 23 05:16:11 2024 by modify_doxy.py rev. 669887