Guiliani  Version 2.6 revision 7293 (documentation build 12)
GUILayouterAlignToParent.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef GUILAYOUTER_ALIGN_TO_PARENT__H_
11#define GUILAYOUTER_ALIGN_TO_PARENT__H_
12
13#include "GUILayouter.h"
14class CGUIObject;
15
17
38{
39public:
40
43 ALIGN_H_LEFT = 1,
44 ALIGN_H_CENTER = 2,
45 ALIGN_H_RIGHT = 3,
46 ALIGN_H_NONE = 4
47 };
48
51 ALIGN_V_TOP = 1,
52 ALIGN_V_CENTER = 2,
53 ALIGN_V_BOTTOM = 3,
54 ALIGN_V_NONE = 4
55 };
56
60 CGUILayouterAlignToParent(CGUIObject * const pkObject = NULL);
61
64
65 virtual eC_Bool IsDependentOnParentSize() {return false;}
66
73 const HorizontalAlignment_t &eHorizontalAlignment,
74 const VerticalAlignment_t &eVerticalAlignment);
75
79 void InitLayouter(eMovedEdges_t eMovedEdges) { DoLayout(eMovedEdges); }
80
81 virtual void DoLayout(eMovedEdges_t eMovedEdges);
82
83#if defined(GUILIANI_STREAM_GUI) || defined(GUILIANI_WRITE_GUI)
85#endif
86
87#ifdef GUILIANI_STREAM_GUI
88 virtual void ReadFromStream();
89#endif
90
91#ifdef GUILIANI_WRITE_GUI
92 virtual void WriteToStream(const eC_Bool bWriteClassID=false);
93#endif
94
95private:
97 inline void Init();
99 HorizontalAlignment_t m_eHorizontalAlignment;
101 VerticalAlignment_t m_eVerticalAlignment;
102};
103#endif
This layouter aligns an object to its parent.
Definition: GUILayouterAlignToParent.h:38
virtual void DoLayout(eMovedEdges_t eMovedEdges)
void SetAlignment(const HorizontalAlignment_t &eHorizontalAlignment, const VerticalAlignment_t &eVerticalAlignment)
~CGUILayouterAlignToParent()
Destructs an AlignToParent-Layouter.
Definition: GUILayouterAlignToParent.h:63
void InitLayouter(eMovedEdges_t eMovedEdges)
Definition: GUILayouterAlignToParent.h:79
CGUILayouterAlignToParent(CGUIObject *const pkObject=NULL)
HorizontalAlignment_t
Enumeration for the horizontal alignment.
Definition: GUILayouterAlignToParent.h:42
virtual void ReadFromStream()
VerticalAlignment_t
Enumeration for the vertical alignment.
Definition: GUILayouterAlignToParent.h:50
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
virtual eC_Bool IsDependentOnParentSize()
Definition: GUILayouterAlignToParent.h:65
static const eC_UInt LAYOUTER_ALIGN_TO_PARENT_CLASS_VERSION
Class version of align-to-parent layouter class.
Definition: GUILayouterAlignToParent.h:84
Definition: GUILayouter.h:57
eMovedEdges_t
Enumerate possible reasons for calling layout,.
Definition: GUILayouter.h:61
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:81