157 lines
6.7 KiB
C
157 lines
6.7 KiB
C
/*******************************************************************************
|
|
*
|
|
* E M B E D D E D W I Z A R D P R O J E C T
|
|
*
|
|
* Copyright (c) TARA Systems GmbH
|
|
* written by Paul Banach and Manfred Schweyer
|
|
*
|
|
********************************************************************************
|
|
*
|
|
* This software is delivered "as is" and shows the usage of other software
|
|
* components. It is provided as an example software which is intended to be
|
|
* modified and extended according to particular requirements.
|
|
*
|
|
* TARA Systems hereby disclaims all warranties and conditions with regard to the
|
|
* software, including all implied warranties and conditions of merchantability
|
|
* and non-infringement of any third party IPR or other rights which may result
|
|
* from the use or the inability to use the software.
|
|
*
|
|
* This file was generated automatically by Embedded Wizard Studio.
|
|
*
|
|
* Please do not make any modifications of this file! The modifications are lost
|
|
* when the file is generated again by Embedded Wizard Studio!
|
|
*
|
|
* Version : 10.0
|
|
* Date : 17.02.2021 8:00:50
|
|
* Profile : NxpLpc
|
|
* Platform : NXP.LPC.RGB565
|
|
*
|
|
*******************************************************************************/
|
|
|
|
#ifndef _CoreRectView_H
|
|
#define _CoreRectView_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#include "ewrte.h"
|
|
#if EW_RTE_VERSION != 0x000A0000
|
|
#error Wrong version of Embedded Wizard Runtime Environment.
|
|
#endif
|
|
|
|
#include "ewgfx.h"
|
|
#if EW_GFX_VERSION != 0x000A0000
|
|
#error Wrong version of Embedded Wizard Graphics Engine.
|
|
#endif
|
|
|
|
#include "_CoreView.h"
|
|
|
|
/* Forward declaration of the class Core::Group */
|
|
#ifndef _CoreGroup_
|
|
EW_DECLARE_CLASS( CoreGroup )
|
|
#define _CoreGroup_
|
|
#endif
|
|
|
|
/* Forward declaration of the class Core::LayoutContext */
|
|
#ifndef _CoreLayoutContext_
|
|
EW_DECLARE_CLASS( CoreLayoutContext )
|
|
#define _CoreLayoutContext_
|
|
#endif
|
|
|
|
/* Forward declaration of the class Core::Outline */
|
|
#ifndef _CoreOutline_
|
|
EW_DECLARE_CLASS( CoreOutline )
|
|
#define _CoreOutline_
|
|
#endif
|
|
|
|
/* Forward declaration of the class Core::RectView */
|
|
#ifndef _CoreRectView_
|
|
EW_DECLARE_CLASS( CoreRectView )
|
|
#define _CoreRectView_
|
|
#endif
|
|
|
|
|
|
/* The class Core::RectView provides more specialized base functionality for all
|
|
view components with the shape of a rectangle. It provides a property to get
|
|
and set the coordinates of the rectangle @Bounds.
|
|
The class Core::RectView serves as base class for deriving rectangle components
|
|
only. It doesn't define any particular behavior nor appearance. */
|
|
EW_DEFINE_FIELDS( CoreRectView, CoreView )
|
|
EW_PROPERTY( Bounds, XRect )
|
|
EW_END_OF_FIELDS( CoreRectView )
|
|
|
|
/* Virtual Method Table (VMT) for the class : 'Core::RectView' */
|
|
EW_DEFINE_METHODS( CoreRectView, CoreView )
|
|
EW_METHOD( initLayoutContext, void )( CoreRectView _this, XRect aBounds, CoreOutline
|
|
aOutline )
|
|
EW_METHOD( GetRoot, CoreRoot )( CoreView _this )
|
|
EW_METHOD( Draw, void )( CoreView _this, GraphicsCanvas aCanvas,
|
|
XRect aClip, XPoint aOffset, XInt32 aOpacity, XBool aBlend )
|
|
EW_METHOD( HandleEvent, XObject )( CoreView _this, CoreEvent aEvent )
|
|
EW_METHOD( CursorHitTest, CoreCursorHit )( CoreView _this, XRect aArea, XInt32
|
|
aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason )
|
|
EW_METHOD( ArrangeView, XPoint )( CoreRectView _this, XRect aBounds, XEnum
|
|
aFormation )
|
|
EW_METHOD( MoveView, void )( CoreRectView _this, XPoint aOffset, XBool
|
|
aFastMove )
|
|
EW_METHOD( GetExtent, XRect )( CoreRectView _this )
|
|
EW_METHOD( ChangeViewState, void )( CoreView _this, XSet aSetState, XSet aClearState )
|
|
EW_METHOD( OnSetBounds, void )( CoreRectView _this, XRect value )
|
|
EW_END_OF_METHODS( CoreRectView )
|
|
|
|
/* 'C' function for method : 'Core::RectView.initLayoutContext()' */
|
|
void CoreRectView_initLayoutContext( CoreRectView _this, XRect aBounds, CoreOutline
|
|
aOutline );
|
|
|
|
/* The method ArrangeView() is invoked automatically if the superior @Owner group
|
|
needs to re-arrange its views. For example, the changing of the owners size can
|
|
cause the enclosed views to adapt their position and size, so all views still
|
|
fit within the new owners area. This method provides the core functionality for
|
|
the automatic GUI layout mechanism.
|
|
The arrangement is controlled primarily by the @Layout property of the view.
|
|
It specifies a set of alignment constraints and determines whether the view can
|
|
change its size. The bounds area where the view should be arranged, is passed
|
|
in the parameter aBounds. This is usually the current area of the views owner.
|
|
The parameter aFormation defines the desired arrangement mode. Depending on the
|
|
value of this parameter, the views can be arranged in rows or columns. If aFormation
|
|
== Core::Formation.None, no automatic row/column arrangement is performed and
|
|
the view is moved and scaled only to fit inside the aBounds area.
|
|
ArrangeView() is invoked automatically by the framework, so you never should
|
|
need to invoke it directly.
|
|
The method returns the size of the view after it has been arranged. */
|
|
XPoint CoreRectView_ArrangeView( CoreRectView _this, XRect aBounds, XEnum aFormation );
|
|
|
|
/* The method MoveView() changes the position of the view by adding the value aOffset
|
|
to all corners of the view. For example, in case of a line view the value is
|
|
added to the both line end points.
|
|
The parameter aFastMove serves for the optimization purpose. If it is 'true',
|
|
the corners are modified without performing any updates of the view and without
|
|
redrawing the screen. This is useful, when you wish to move or arrange a lot
|
|
of views at once. In this case it's up to you to request the finally screen update.
|
|
To do this you can use the method InvalidateArea() of the views @Owner.
|
|
In the case aFastMove == false, the operation automatically requests the screen
|
|
redraw of the view areas before and after the movement. You don't need to take
|
|
care about it. */
|
|
void CoreRectView_MoveView( CoreRectView _this, XPoint aOffset, XBool aFastMove );
|
|
|
|
/* The method GetExtent() returns the position and the size of the view relative
|
|
to the origin of its @Owner. In case of views with a non rectangular shape the
|
|
method returns the rectangular boundary area enclosing the entire shape. */
|
|
XRect CoreRectView_GetExtent( CoreRectView _this );
|
|
|
|
/* 'C' function for method : 'Core::RectView.OnSetBounds()' */
|
|
void CoreRectView_OnSetBounds( CoreRectView _this, XRect value );
|
|
|
|
/* Wrapper function for the virtual method : 'Core::RectView.OnSetBounds()' */
|
|
void CoreRectView__OnSetBounds( void* _this, XRect value );
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _CoreRectView_H */
|
|
|
|
/* Embedded Wizard */
|