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

Go to the SVN repository for this file.

1 #ifndef GUI_OPENGL___GL_CONTAINER__HPP
2 #define GUI_OPENGL___GL_CONTAINER__HPP
3 
4 /* $Id: glcontainer.hpp 14562 2007-05-18 11:48:21Z dicuccio $
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: Peter Meric
30  *
31  * File Description:
32  * CGlContainer
33  */
34 
35 #include <corelib/ncbiobj.hpp>
36 #include <gui/opengl/glwidget.hpp>
37 #include <gui/opengl/glevent.hpp>
38 
39 /** @addtogroup GUI_OPENGL
40  *
41  * @{
42  */
43 
44 
46 
47 
49 {
50 protected:
52  typedef vector<TWidgetRef> TWidgetList;
53 
54 public:
55  CGlContainer();
56  virtual ~CGlContainer();
57 
58  virtual void Draw(void);
59  virtual void ProcessEvent(CGlEvent& event);
60 
61  virtual void Add(CGlWidget* widget);
62  virtual void Remove(CGlWidget* widget);
63  virtual void Clear(void);
64  virtual size_t Size(void) const;
65 
66  typedef TWidgetList::iterator iterator;
67  typedef TWidgetList::const_iterator const_iterator;
68 
69  iterator begin(void);
70  const_iterator begin(void) const;
71  iterator end(void);
72  const_iterator end(void) const;
73 
74 private:
75  TWidgetList m_Children;
76 };
77 
78 
80 
81 /* @} */
82 
83 #endif // GUI_OPENGL___GL_CONTAINER__HPP
CRef< CGlWidget > TWidgetRef
Definition: glcontainer.hpp:51
TWidgetList::const_iterator const_iterator
Definition: glcontainer.hpp:67
vector< TWidgetRef > TWidgetList
Definition: glcontainer.hpp:52
virtual void Draw(void)=0
TWidgetList::iterator iterator
Definition: glcontainer.hpp:66
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:101
#define NCBI_GUIOPENGL_EXPORT
Definition: gui_export.h:503
virtual void ProcessEvent(CGlEvent &event)=0
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx...
CRef –.
Definition: ncbiobj.hpp:616
TWidgetList m_Children
Definition: glcontainer.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:98
Modified on Mon Mar 27 16:06:33 2017 by modify_doxy.py rev. 506947