source: flair-src/trunk/lib/FlairCore/src/Layout.h@ 422

Last change on this file since 422 was 15, checked in by Bayard Gildas, 9 years ago

sources reformatted with flair-format-dir script

File size: 2.0 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file Layout.h
7 * \brief Abstract class to display a layout on the ground station
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2011/10/07
10 * \version 4.0
11 */
12
13#ifndef LAYOUT_H
14#define LAYOUT_H
15
16#include <Widget.h>
17#include <Mutex.h>
18
19namespace flair {
20namespace gui {
21class LayoutPosition;
22
23/*! \class Layout
24*
25* \brief Abstract class to display a layout on the ground station
26*
27* This is an abstract class to display layouts (like GridLayout, GroupBox, etc).
28*\n
29* A layout can contains Widgets (Box, DataPlot, Picture, etc). \n
30* Layout holds a Mutex, which can be used to protect access to Box's value for
31*example.
32*/
33class Layout : public Widget {
34 friend class Box;
35
36public:
37 /*!
38 * \brief Constructor
39 *
40 * Construct a Layout. Type is a predifined one, and will be
41 * interpreted by the ground station.
42 *
43 * \param parent parent
44 * \param name name
45 * \param type type of layout
46 */
47 Layout(const Widget *parent, std::string name, std::string type);
48
49 /*!
50 * \brief Destructor
51 *
52 */
53 ~Layout();
54
55 /*!
56 * \brief Last Row and Col LayoutPosition
57 *
58 * Get a LayoutPosition at the last row and col.
59 *
60 * \return the LayoutPosition
61 */
62 LayoutPosition *LastRowLastCol(void) const;
63
64 /*!
65 * \brief New Row LayoutPosition
66 *
67 * Get a LayoutPosition at a new row and first col. This new row will be at the
68 *last position.
69 *
70 * \return the LayoutPosition
71 */
72 LayoutPosition *NewRow(void) const;
73
74 /*!
75 * \brief LayoutPosition at specified position
76 *
77 * Get a LayoutPosition at specified row and col.
78 *
79 * \param row row
80 * \param col col
81 *
82 * \return the LayoutPosition
83 */
84 LayoutPosition *At(uint16_t row, uint16_t col) const;
85
86private:
87 /*!
88 * \brief Mutex
89 *
90 * This Mutex can be used by friends class like Box to protect access
91 * to Box's value.
92 */
93 core::Mutex *mutex;
94};
95
96} // end namespace gui
97} // end namespace flair
98
99#endif // LAYOUT_H
Note: See TracBrowser for help on using the repository browser.