DUDS
Distributed Update of Data from Something
SingleLayoutPanel.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the DUDS project. It is subject to the BSD-style
3  * license terms in the LICENSE file found in the top-level directory of this
4  * distribution and at https://github.com/jjackowski/duds/blob/master/LICENSE.
5  * No part of DUDS, including this file, may be copied, modified, propagated,
6  * or distributed except according to the terms contained in the LICENSE file.
7  *
8  * Copyright (C) 2020 Jeff Jackowski
9  */
13 #include <duds/general/Errors.hpp>
14 
15 namespace duds { namespace ui { namespace graphics {
16 
18  if (!pgl) {
20  }
21  return pgl->panelConfig(pri);
22 }
23 
25  if (pgl) {
27  PanelPriority(p)
28  );
29  }
30  pgl = l;
31  pri = p;
32 }
33 
35  assert((pgl == l) && (pri == p));
36  pgl = nullptr;
37  pri = 0;
38 }
39 
40 } } }
A panel that can only be used in one layout was added to another layout.
virtual void removing(PriorityGridLayout *l, int p)
Records that the panel has been removed from the layout.
GridLayoutConfig & panelConfig(unsigned int pri)
Returns the layout configuration for the specified panel.
virtual void added(PriorityGridLayout *l, int p)
Records the layout object and priority that has been assigned to this panel.
A way to place Panel objects dynamically with a priority mechanism to allow panels to be resized and ...
unsigned int pri
The priority value assigned to this Panel when added to a layout.
An operation that requires a panel to be added to a layout was attempted on a panel that is not in an...
GridLayoutConfig & panelConfig()
Returns the panel&#39;s layout configuration.
PriorityGridLayout * pgl
The layout object that has added this Panel, or nullptr if not added.
General graphics related code.
Definition: HD44780.hpp:15
Informs a PriorityGridLayout object where to place and how large to make Panel objects.
boost::error_info< struct Info_PanelPriority, int > PanelPriority
Identifies a Panel object&#39;s layout priority in errors.
General errors.
#define DUDS_THROW_EXCEPTION(x)
Works like BOOST_THROW_EXCEPTION, but includes a stack trace if DUDS_ERRORS_VERBOSE is defined...
Definition: Errors.hpp:48