Views.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: App
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeApp/Base.h"
16 #include "CeeCore/Base.h"
17 #include "CeeCore/PtrRef.h"
18 #include "CeeCore/RefCountedObject.h"
19 #include "CeeVisualization/View.h"
20 
21 
22 namespace cee {
23 namespace app {
24 
25 class Selection;
26 
27 //==================================================================================================
31 //==================================================================================================
32 struct CEE_APP_EXPORT ViewInfo
33 {
34  ViewInfo() {};
35 };
36 
37 
38 //==================================================================================================
39 //
40 // Class for View management
41 //
42 //==================================================================================================
43 class CEE_APP_EXPORT Views : public RefCountedObject
44 {
45 
46 public:
47 
48  static Views* instance();
49 
50  size_t count() const;
51 
52  cee::vis::View* current();
53  ViewInfo currentViewInfo() const;
54  Selection* currentViewSelection();
55  void setCurrent(cee::vis::View* view);
56 
57  size_t currentIndex() const;
58  void setCurrentIndex(size_t index);
59 
60  size_t indexOf(const cee::vis::View* view) const;
61  cee::vis::View* get(size_t index);
62 
63  ViewInfo viewInfo(size_t viewIndex) const;
64  ViewInfo viewInfo(cee::vis::View* view) const;
65 
66  Selection* viewSelection(size_t viewIndex);
67  Selection* viewSelection(cee::vis::View* view);
68 
70 
71  bool remove(size_t index);
72  bool remove(cee::vis::View* view);
73  bool removeCurrent();
74 
75 
76 private:
77  Views();
78  virtual ~Views();
79 
80  CEE_PRIVATE_IMPL(Views);
81  CEE_DISALLOW_COPY_AND_ASSIGN(Views);
82 
83 };
84 
85 } // namespace cee
86 } // namespace app
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Class to manage a list of selected HitItems. Selected items are per view.
Definition: Selection.h:38
Small view info struct.
Definition: Views.h:32
Smart pointer class used for handling reference counted objects (that derive from Object)...
Definition: PtrRef.h:26
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Provides a render area in the user control/widget to enable visualization of the current model data a...
Definition: View.h:40
Class to manage the list of views in the application.
Definition: Views.h:43