Changeset 8086b07cf076736d43c955c00c4cbb1464e53dd7

Show
Ignore:
Timestamp:
01/28/07 17:49:30 (1 year ago)
Author:
Olivier Teulière <ipkiss@videolan.org>
git-committer:
Olivier Teulière <ipkiss@videolan.org> 1170002970 +0000
git-parent:

[7c23b5c78d6520d80bcbc2f31d0f3b8173c58978]

git-author:
Olivier Teulière <ipkiss@videolan.org> 1170002970 +0000
Message:
  • skins2:
    • New Panel tag, allowing to group the resizing behaviour of controls
    • Documentation updated accordingly
    • Fixed a memory leak due to CtrlMove/CtrlResize? objects
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/skins/skins2-howto.xml

    rccd0b04 r8086b07  
    6363<para>Those of you who have already made skins for other software should have no 
    6464difficulty to understand how VLC skins work.</para> 
    65  
    66 </sect1> 
    67  
    68 <sect1 id="bezier"> 
    69 <title>Bezier curves</title> 
    70  
    71 <para>One cool thing with VLC sliders is that they are not necessarily rectilinear, but they can follow any Bezier curve. So if you want to have a slider moving on a half-circle, or even doing a loop, you can!</para> 
    72  
    73 <para>This is not the place to explain how Bezier curves work (see <ulink url="http://astronomy.swin.edu.au/~pbourke/curves/bezier/">http://astronomy.swin.edu.au/~pbourke/curves/bezier/</ulink> for a nice introduction), the main thing to know is that a Bezier curve can be characterized by a set of points. Once you have them (thanks to the <link linkend="CurveMaker">CurveMaker</link> utility for example<!--XXX: deprecated-->), you just need to enter the list of points in the <link linkend="sliderpoints">points</link> attribute. Here is an example with 3 points: points="(2,50),(45,120),(88,50)".</para> 
    74  
    75 <para>Bezier curves can be used with the <link linkend="Slider">Slider</link> and <link linkend="Anchor">Anchor</link> tags:</para> 
    76  
    77 <itemizedlist> 
    78   <listitem><para>For sliders, it defines the curve followed by the cursor of the slider. This curve is of course invisible, so if you want a visible background for your <link linkend="Slider">Slider</link> you need to provide it yourself using the <link linkend="Image">Image</link> tag.</para></listitem> 
    79   <listitem><para>For anchors, the use of Bezier curves is more anecdotic. Its purpose is to have non-ponctual anchor, the whole curve becoming the anchor. In this case, a ponctual anchor (and only a ponctual one) can be attracted by any point of the curve, if it is in its range of action. In fact, you can consider the curve as an easy way to define at once many anchors that share the same properties (except their position, of course :)).</para></listitem> 
    80 </itemizedlist> 
    81  
    82 <note><para>The coordinates are relative to the upper-left corner of the control (i.e. to its <link linkend="x">x</link> and <link linkend="y">y</link> attributes).</para></note> 
    8365 
    8466</sect1> 
     
    322304  <sect3 id="layoutwidth"> 
    323305    <title>width</title> 
    324     <para><!--TODO: calculate it in VLC :)-->Width of the layout. this value is required since VLC is not (yet?) able to calculate it using the sizes and positions of the controls.</para> 
     306    <para><!--TODO: calculate it in VLC :)-->Initial width of the layout. This value is required since VLC is not (yet?) able to calculate it using the sizes and positions of the controls.</para> 
    325307    <para><emphasis>Required.</emphasis></para> 
    326308  </sect3> 
    327309  <sect3 id="layoutheight"> 
    328310    <title>height</title> 
    329     <para><!--TODO: calculate it in VLC :)-->Height of the layout. this value is required since VLC is not (yet?) able to calculate it using the sizes and positions of the controls.</para> 
     311    <para><!--TODO: calculate it in VLC :)-->Initial height of the layout. This value is required since VLC is not (yet?) able to calculate it using the sizes and positions of the controls.</para> 
    330312    <para><emphasis>Required.</emphasis></para> 
    331313  </sect3> 
     
    354336<sect2 id="Group"> 
    355337  <title>Group</title> 
    356   <para>Adds an offset to the elements it contains. A Group is only supposed to ease the job of the skin designer, who can adjust the position of a group of controls without modifying all the coordinates, but you can ignore it if you want (only one Group is necessary, inside the <link linkend="Layout">Layout</link> tag). Group tags can be nested.</para> 
     338  <para>Add an offset to the elements it contains. A Group is only supposed to ease the job of the skin designer, who can adjust the position of a group of controls without modifying all the coordinates, but you can ignore it if you want (only one Group is necessary, inside the <link linkend="Layout">Layout</link> tag). Group tags can be nested. Note that Group elements are deprecated, since <link linkend="Panel">Panel</link> elements are more powerful.</para> 
    357339  <sect3 id="groupx"> 
    358340    <title>x</title> 
    359     <para>Try and guess.</para> 
     341    <para>Horizontal offset, relative to the container box (see the <link linkend="layoutmodel">Layout model</link> for more details).</para> 
    360342    <para>Default value: 0</para> 
    361343  </sect3> 
    362344  <sect3 id="groupy"> 
    363345    <title>y</title> 
    364     <para>What do you think?</para> 
    365     <para>Default value: 0</para> 
     346    <para>Vertical offset, relative to the container box (see the <link linkend="layoutmodel">Layout model</link> for more details).</para> 
     347    <para>Default value: 0</para> 
     348  </sect3> 
     349</sect2> 
     350 
     351<sect2 id="Panel"> 
     352  <title>Panel</title> 
     353  <para>A Panel can be seen as an enhanced <link linkend="Layout">Group</link>. It also adds an offset to the elements it contains, but in addition it becomes their reference for the lefttop, rightbottom, xkeepratio and ykeepratio attributes. Panel tags can be nested. Since VLC 0.9.0.</para> 
     354  <para>See the <link linkend="commattr">common attributes</link>.</para> 
     355  <sect3 id="panelx"> 
     356    <title>x</title> 
     357    <para>Same as the <link linkend="x">x</link> attribute of the <link linkend="commattr">common attributes</link>.</para> 
     358  </sect3> 
     359  <sect3 id="panely"> 
     360    <title>y</title> 
     361    <para>Same as the <link linkend="y">y</link> attribute of the <link linkend="commattr">common attributes</link>.</para> 
     362  </sect3> 
     363  <sect3 id="panelwidth"> 
     364    <title>width</title> 
     365    <para>Initial width of this container box (see the <link linkend="layoutmodel">Layout model</link> for more details).</para> 
     366  </sect3> 
     367  <sect3 id="panelheight"> 
     368    <title>height</title> 
     369    <para>Initial height of this container box (see the <link linkend="layoutmodel">Layout model</link> for more details).</para> 
     370  </sect3> 
     371  <sect3 id="panellefttop"> 
     372    <title>lefttop</title> 
     373    <para>Same as the <link linkend="lefttop">lefttop</link> attribute of the <link linkend="commattr">common attributes</link>.</para> 
     374  </sect3> 
     375  <sect3 id="panelrightbottom"> 
     376    <title>rightbottom</title> 
     377    <para>Same as the <link linkend="rightbottom">rightbottom</link> attribute of the <link linkend="commattr">common attributes</link>.</para> 
     378  </sect3> 
     379  <sect3 id="panelxkeepratio"> 
     380    <title>xkeepratio</title> 
     381    <para>Same as the <link linkend="xkeepratio">xkeepratio</link> attribute of the <link linkend="commattr">common attributes</link>.</para> 
     382  </sect3> 
     383  <sect3 id="panelykeepratio"> 
     384    <title>ykeepratio</title> 
     385    <para>Same as the <link linkend="ykeepratio">ykeepratio</link> attribute of the <link linkend="commattr">common attributes</link>.</para> 
    366386  </sect3> 
    367387</sect2> 
     
    372392  <sect3 id="anchorx"> 
    373393    <title>x</title> 
    374     <para>Is it really necessary to explain ?</para> 
     394    <para>Is it really necessary to explain?</para> 
    375395    <para>Default value: 0</para> 
    376396  </sect3> 
     
    420440  <sect3 id="x"> 
    421441    <title>x</title> 
    422     <para>Horizontal offset of the control, relative to the parent tag (usually <link linkend="Group">Group</link> or <link linkend="Layout">Layout</link>).</para> 
     442    <para>Horizontal offset of the control, relative to the container box (see the <link linkend="layoutmodel">Layout model</link>) or to the parent <link linkend="Group">Group</link>.</para> 
    423443    <para>Default value: 0</para> 
    424444  </sect3> 
    425445  <sect3 id="y"> 
    426446    <title>y</title> 
    427     <para>Vertical offset of the control, relative to the parent tag (usually <link linkend="Group">Group</link> or <link linkend="Layout">Layout</link>).</para> 
     447    <para>Vertical offset of the control, relative to the container box (see the <link linkend="layoutmodel">Layout model</link>) or to the parent <link linkend="Group">Group</link>.</para> 
    428448    <para>Default value: 0</para> 
    429449  </sect3> 
    430450  <sect3 id="lefttop"> 
    431451    <title>lefttop</title> 
    432     <para>Indicate to which corner of the Layout the top-left-hand corner of this control is attached, in case of resizing. Possible values are 'lefttop', 'leftbottom', 'righttop' and 'rightbottom'.</para> 
     452    <para>Indicate to which corner of the container box the top-left-hand corner of this control is attached, in case of resizing. Possible values are 'lefttop', 'leftbottom', 'righttop' and 'rightbottom'. See the <link linkend="layoutmodel">Layout model</link> for more details.</para> 
    433453    <para>Default value: lefttop</para> 
    434454  </sect3> 
    435455  <sect3 id="rightbottom"> 
    436456    <title>rightbottom</title> 
    437     <para>Indicate to which corner of the Layout the bottom-right-hand corner of this control is attached, in case of resizing.</para> 
     457    <para>Indicate to which corner of the container box the bottom-right-hand corner of this control is attached, in case of resizing. See the <link linkend="layoutmodel">Layout model</link> for more details.</para> 
    438458    <para>Default value: lefttop</para> 
    439459  </sect3> 
    440460  <sect3 id="xkeepratio"> 
    441461    <title>xkeepratio</title> 
    442     <para>When set to true, the behaviour of the horizontal resizing is changed. Instead of taking into account the <link linkend="lefttop">lefttop</link> and <link linkend="rightbottom">rightbottom</link> attributes to determine how the control will be moved/resized, only its initial position inside the <link linkend="Layout">Layout</link> matters. For example, if initially the space to the left of the control is twice as big as the one to its right, this will stay the same during any horizontal resizing. The width of the control stays constant.</para> 
    443     <para>This attribute can be particularly useful to keep a control centered in the layout, without resizing it (to resize it, you would rather use the lefttop/rightbottom attributes). Available since VLC 0.8.6.</para> 
     462    <para>When set to true, the behaviour of the horizontal resizing is changed. Instead of taking into account the <link linkend="lefttop">lefttop</link> and <link linkend="rightbottom">rightbottom</link> attributes to determine how the control will be moved/resized, only its initial position inside the container box matters. For example, if initially the space to the left of the control is twice as big as the one to its right, this will stay the same during any horizontal resizing. The width of the control stays constant.</para> 
     463    <para>This attribute can be particularly useful to keep a control centered in the container box, without resizing it (to resize it, you would rather use the lefttop/rightbottom attributes). See the <link linkend="layoutmodel">Layout model</link> for more details. Available since VLC 0.8.6.</para> 
    444464    <para>Default value: false</para> 
    445465  </sect3> 
     
    447467    <title>ykeepratio</title> 
    448468    <para>When set to true, the behaviour of the vertical resizing is changed. Instead of taking into account the <link linkend="lefttop">lefttop</link> and <link linkend="rightbottom">rightbottom</link> attributes to determine how the control will be moved/resized, only its initial position inside the <link linkend="Layout">Layout</link> matters. For example, if initially the space to the top of the control is twice as big as the one to its bottom, this will stay the same during any vertical resizing. The height of the control stays constant.</para> 
    449     <para>This attribute can be particularly useful to keep a control centered in the layout, without resizing it (to resize it, you would rather use the lefttop/rightbottom attributes). Available since VLC 0.8.6.</para> 
     469    <para>This attribute can be particularly useful to keep a control centered in the container box, without resizing it (to resize it, you would rather use the lefttop/rightbottom attributes). See the <link linkend="layoutmodel">Layout model</link> for more details. Available since VLC 0.8.6.</para> 
    450470    <para>Default value: false</para> 
    451471  </sect3> 
     
    11151135</sect1> 
    11161136 
     1137<sect1 id="layoutmodel"> 
     1138<title>Layout model</title> 
     1139 
     1140<para>Placing the controls on a window is easy, using their x and y attributes, but these positions become insufficient for a resizable window. Some controls (or groups of controls) should stay centered in the window, others should follow the right side of the window, others should change their size automatically, etc... To handle these various behaviours, the layout model followed by the skins engine is a model based on nested boxes.</para> 
     1141 
     1142<para>There are 2 kinds of boxes:</para> 
     1143 
     1144<itemizedlist> 
     1145  <listitem><para> 
     1146    <emphasis>simple boxes</emphasis>: These boxes cannot contain other boxes. All the visible controls are simple boxes: Image, Button, Checkbox, Text, Slider, RadialSlider, Playlist, Playtree, Video. 
     1147  </para></listitem> 
     1148  <listitem><para> 
     1149    <emphasis>container boxes</emphasis>: These boxes can contain other boxes. Only two XML tags create container boxes: <link linkend="Panel">Panel</link> and <link linkend="Layout">Layout</link>. The Layout tag is necessarily the top-level box for the current layout, and cannot be contained, but Panel elements can be contained. 
     1150  </para></listitem> 
     1151</itemizedlist> 
     1152 
     1153<para>A box inside a container box always defines how it should react when its container box is resized. Two different mechanisms are provided: corners anchoring (useful when resizing of the inner box is wanted, for example) and constant ratio (mainly useful to keep the inner box centered inside its parent):</para> 
     1154<itemizedlist> 
     1155  <listitem><para> 
     1156    <emphasis>corners anchoring</emphasis>: The top-left-hand corner (TL) and the bottom-right-hand corner (BR) of the inner box are "tied" to corners of the container box (TL, TR, BL or BR). When any resizing occurs, tied corners move together, which can move or resize the inner box. For example, if the TL corner of the inner box is tied to the TL corner of the container (let's write it TL/TL), and if the BR corner of the inner box is also tied to the TL corner of the container box (BR/TL), the inner box will not be resized, and will always stay at the same place (this is the default behaviour). If we have TL/TL and TL/BL, the inner box is resized vertically its container is resized. If we have TL/TR and BR/TR, the inner box moves with the TR corner of its container. We could even define TL/BR and BR/TL, in which case increasing the size of the container box would shrink the size of the inner box... until it disappears completely! 
     1157  </para> 
     1158  <para>This mechanism is controlled by the <link linkend="lefttop">lefttop</link> and <link linkend="rightbottom">rightbottom</link> attributes of the controls. 
     1159  </para></listitem> 
     1160  <listitem><para> 
     1161    <emphasis>constant ratio</emphasis>: When a box doesn't fill completely its container box, there is space on the top, bottom, left and right of the inner box. It is possible to force the ratio between the space on the top and the space on the bottom (or the one on the left and the one on the right)  to be constant. Any resizing of the container box will then move the inner box accordingly, and the size of the inner box will never change (it overrides the corners anchoring mechanism). The horizontal and vertical ratios being independent, it is for example possible to keep only the horizontal ratio constant, in which case the inner box can still resize vertically (depending on its attributes for the corners anchoring, of course). 
     1162  </para> 
     1163  <para>This mechanism is controlled by the <link linkend="xkeepratio">xkeepratio</link> and <link linkend="ykeepratio">ykeepratio</link> attributes of the controls. 
     1164  </para></listitem> 
     1165</itemizedlist> 
     1166 
     1167</sect1> 
     1168 
    11171169 
    11181170<sect1> 
     
    11371189</sect1> 
    11381190 
     1191<sect1 id="bezier"> 
     1192<title>Bezier curves</title> 
     1193 
     1194<para>One cool thing with VLC sliders is that they are not necessarily rectilinear, but they can follow any Bezier curve. So if you want to have a slider moving on a half-circle, or even doing a loop, you can!</para> 
     1195 
     1196<para>This is not the place to explain how Bezier curves work (see <ulink url="http://astronomy.swin.edu.au/~pbourke/curves/bezier/">http://astronomy.swin.edu.au/~pbourke/curves/bezier/</ulink> for a nice introduction), the main thing to know is that a Bezier curve can be characterized by a set of points. Once you have them (thanks to the <link linkend="CurveMaker">CurveMaker</link> utility for example<!--XXX: deprecated-->), you just need to enter the list of points in the <link linkend="sliderpoints">points</link> attribute. Here is an example with 3 points: points="(2,50),(45,120),(88,50)".</para> 
     1197 
     1198<para>Bezier curves can be used with the <link linkend="Slider">Slider</link> and <link linkend="Anchor">Anchor</link> tags:</para> 
     1199 
     1200<itemizedlist> 
     1201    <listitem><para>For sliders, it defines the curve followed by the cursor of the slider. This curve is of course invisible, so if you want a visible background for your <link linkend="Slider">Slider</link> you need to provide it yourself using a <link linkend="SliderBackground">SliderBackground</link> or <link linkend="Image">Image</link> tag.</para></listitem> 
     1202  <listitem><para>For anchors, the use of Bezier curves is more anecdotic. Its purpose is to have non-ponctual anchor, the whole curve becoming the anchor. In this case, a ponctual anchor (and only a ponctual one) can be attracted by any point of the curve, if it is in its range of action. In fact, you can consider the curve as an easy way to define at once many anchors that share the same properties (except their position, of course :)).</para></listitem> 
     1203</itemizedlist> 
     1204 
     1205<note><para>The coordinates are relative to the upper-left corner of the control (i.e. to its <link linkend="x">x</link> and <link linkend="y">y</link> attributes).</para></note> 
     1206 
     1207</sect1> 
     1208 
    11391209<sect1> 
    11401210<title>Tools and advice</title> 
     
    11441214 
    11451215  <para> 
    1146 To generate easily Bezier curves, you can use the <ulink url="/vlc/skins/VLC-curve-maker.exe">curve-maker</ulink> (sorry, this is for Windows users only). Basically, you add and remove points at will, and you can move them to see how the curve evolves. When you have reached the perfect curve, you just have to copy-paste the list of abscissas and ordinates to form the <link linkend="sliderpoints">points</link> attribute of your <link linkend="Slider">Slider</link> or <link linkend="Playlist">Playlist</link>. The curve-maker also allows to load a .bmp file, this could be useful if you want to follow a specific pattern of a slider, for example. 
     1216To generate easily Bezier curves, you can use the <ulink url="/vlc/skins/VLC-curve-maker.exe">CurveMaker</ulink> utility (sorry, this is for Windows users only). Basically, you add and remove points at will, and you can move them to see how the curve evolves. When you have reached the perfect curve, you just have to copy-paste the list of abscissas and ordinates to form the <link linkend="sliderpoints">points</link> attribute of your <link linkend="Slider">Slider</link> or <link linkend="Anchor">Anchor</link>. The curve-maker also allows to load a .bmp file, this could be useful if you want to follow a specific pattern of a slider, for example. 
    11471217  </para> 
    11481218 
  • modules/gui/skins2/parser/builder.cpp

    rdb7965b r8086b07  
    108108    ADD_OBJECTS( PopupMenu ); 
    109109    ADD_OBJECTS( Layout ); 
     110    ADD_OBJECTS( Panel ); 
    110111    ADD_OBJECTS( Anchor ); 
    111112    ADD_OBJECTS( Button ); 
     
    138139        } \ 
    139140    } 
     141 
     142 
     143// Macro to get the parent box of a control, given the panel ID 
     144#define GET_BOX( pRect, id, pLayout ) \ 
     145    if( id == "none" ) \ 
     146        pRect = &pLayout->getRect(); \ 
     147    else \ 
     148    { \ 
     149        const Position *pParent = \ 
     150            m_pTheme->getPositionById( rData.m_panelId ); \ 
     151        if( pParent == NULL ) \ 
     152        { \ 
     153            msg_Err( getIntf(), "parent panel could not be found: %s", \ 
     154                     rData.m_panelId.c_str() ); \ 
     155            return; \ 
     156        } \ 
     157        pRect = pParent; \ 
     158    } 
     159 
    140160 
    141161void Builder::addTheme( const BuilderData::Theme &rData ) 
     
    383403                                       rData.m_xPos, rData.m_yPos, 
    384404                                       pCurve->getWidth(), 
    385                                        pCurve->getHeight(), *pLayout ); 
     405                                       pCurve->getHeight(), 
     406                                       pLayout->getRect() ); 
    386407 
    387408    Anchor *pAnc = new Anchor( getIntf(), pos, rData.m_range, rData.m_priority, 
     
    425446        *pBmpDown, *pCommand, UString( getIntf(), rData.m_tooltip.c_str() ), 
    426447        UString( getIntf(), rData.m_help.c_str() ), pVisible ); 
     448    m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pButton ); 
    427449 
    428450    // Compute the position of the control 
    429451    // XXX (we suppose all the images have the same size...) 
     452    const GenericRect *pRect; 
     453    GET_BOX( pRect, rData.m_panelId , pLayout); 
    430454    const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, 
    431455                                       rData.m_xPos, rData.m_yPos, 
    432456                                       pBmpUp->getWidth(), 
    433                                        pBmpUp->getHeight(), *pLayout, 
     457                                       pBmpUp->getHeight(), *pRect, 
    434458                                       rData.m_xKeepRatio, rData.m_yKeepRatio ); 
    435459 
    436460    pLayout->addControl( pButton, pos, rData.m_layer ); 
    437  
    438     m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pButton ); 
    439461} 
    440462 
     
    501523        UString( getIntf(), rData.m_tooltip2.c_str() ), *pVar, 
    502524        UString( getIntf(), rData.m_help.c_str() ), pVisible ); 
     525    m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pCheckbox ); 
    503526 
    504527    // Compute the position of the control 
    505528    // XXX (we suppose all the images have the same size...) 
     529    const GenericRect *pRect; 
     530    GET_BOX( pRect, rData.m_panelId , pLayout); 
    506531    const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, 
    507532                                       rData.m_xPos, rData.m_yPos, 
    508533                                       pBmpUp1->getWidth(), 
    509                                        pBmpUp1->getHeight(), *pLayout, 
     534                                       pBmpUp1->getHeight(), *pRect, 
    510535                                       rData.m_xKeepRatio, rData.m_yKeepRatio ); 
    511536 
    512537    pLayout->addControl( pCheckbox, pos, rData.m_layer ); 
    513  
    514     m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pCheckbox ); 
    515538} 
    516539 
     
    551574    CtrlImage *pImage = new CtrlImage( getIntf(), *pBmp, *pCommand, 
    552575        resizeMethod, UString( getIntf(), rData.m_help.c_str() ), pVisible ); 
     576    m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pImage ); 
    553577 
    554578    // Compute the position of the control 
     579    const GenericRect *pRect; 
     580    GET_BOX( pRect, rData.m_panelId , pLayout); 
    555581    const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, 
    556582                                       rData.m_xPos, rData.m_yPos, 
    557583                                       pBmp->getWidth(), pBmp->getHeight(), 
    558                                        *pLayout, rData.m_xKeepRatio, 
     584                                       *pRect, rData.m_xKeepRatio, 
    559585                                       rData.m_yKeepRatio ); 
    560586 
    561     // XXX: test to be changed! XXX 
    562587    if( rData.m_actionId == "move" ) 
    563588    { 
     
    565590             *pImage, *pWindow, UString( getIntf(), rData.m_help.c_str() ), 
    566591             pVisible ); 
     592        m_pTheme->m_controls[rData.m_id + "_move"] = CtrlGenericPtr( pMove ); 
    567593        pLayout->addControl( pMove, pos, rData.m_layer ); 
    568594    } 
     
    573599                UString( getIntf(), rData.m_help.c_str() ), pVisible, 
    574600                WindowManager::kResizeS ); 
     601        m_pTheme->m_controls[rData.m_id + "_rsz"] = CtrlGenericPtr( pResize ); 
    575602        pLayout->addControl( pResize, pos, rData.m_layer ); 
    576603    } 
     
    581608                UString( getIntf(), rData.m_help.c_str() ), pVisible, 
    582609                WindowManager::kResizeE ); 
     610        m_pTheme->m_controls[rData.m_id + "_rsz"] = CtrlGenericPtr( pResize ); 
    583611        pLayout->addControl( pResize, pos, rData.m_layer ); 
    584612    } 
     
    589617                UString( getIntf(), rData.m_help.c_str() ), pVisible, 
    590618                WindowManager::kResizeSE ); 
     619        m_pTheme->m_controls[rData.m_id + "_rsz"] = CtrlGenericPtr( pResize ); 
    591620        pLayout->addControl( pResize, pos, rData.m_layer ); 
    592621    } 
     
    595624        pLayout->addControl( pImage, pos, rData.m_layer ); 
    596625    } 
    597  
    598     m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pImage ); 
     626
     627 
     628 
     629void Builder::addPanel( const BuilderData::Panel &rData ) 
     630
     631    // This method makes the assumption that the Panels are created in the 
     632    // order of the XML, because each child Panel expects its parent Panel 
     633    // in order to be fully created 
     634 
     635    GenericLayout *pLayout = m_pTheme->getLayoutById( rData.m_layoutId ); 
     636    if( pLayout == NULL ) 
     637    { 
     638        msg_Err( getIntf(), "unknown layout id: %s", rData.m_layoutId.c_str() ); 
     639        return; 
     640    } 
     641 
     642    const GenericRect *pRect; 
     643    GET_BOX( pRect, rData.m_panelId , pLayout); 
     644    Position *pPos = 
     645        new Position( makePosition( rData.m_leftTop, rData.m_rightBottom, 
     646                                    rData.m_xPos, rData.m_yPos, 
     647                                    rData.m_width, rData.m_height, 
     648                                    *pRect, rData.m_xKeepRatio, 
     649                                    rData.m_yKeepRatio ) ); 
     650    m_pTheme->m_positions[rData.m_id] = PositionPtr( pPos ); 
    599651} 
    600652 
     
    658710        UString( getIntf(), rData.m_help.c_str() ), rData.m_color, pVisible, 
    659711        scrolling, alignment ); 
     712    m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pText ); 
    660713 
    661714    int height = pFont->getSize(); 
    662715 
    663716    // Compute the position of the control 
     717    const GenericRect *pRect; 
     718    GET_BOX( pRect, rData.m_panelId , pLayout); 
    664719    const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, 
    665720                                       rData.m_xPos, rData.m_yPos, 
    666                                        rData.m_width, height, *pLayout, 
     721                                       rData.m_width, height, *pRect, 
    667722                                       rData.m_xKeepRatio, rData.m_yKeepRatio ); 
    668723 
     
    672727    UString msg( getIntf(), rData.m_text.c_str() ); 
    673728    pVar->set( msg ); 
    674  
    675     m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pText ); 
    676729} 
    677730 
     
    709762                              UString( getIntf(), rData.m_help.c_str() ), 
    710763                              pVisible ); 
     764    m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pRadial ); 
    711765 
    712766    // XXX: resizing is not supported 
    713767    // Compute the position of the control 
     768    const GenericRect *pRect; 
     769    GET_BOX( pRect, rData.m_panelId , pLayout); 
    714770    const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, 
    715771                                       rData.m_xPos, rData.m_yPos, 
    716772                                       pSeq->getWidth(), 
    717773                                       pSeq->getHeight() / rData.m_nbImages, 
    718                                        *pLayout, 
     774                                       *pRect, 
    719775                                       rData.m_xKeepRatio, rData.m_yKeepRatio ); 
    720776 
    721777    pLayout->addControl( pRadial, pos, rData.m_layer ); 
    722  
    723     m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pRadial ); 
    724778} 
    725779 
     
    773827        rData.m_nbVert, rData.m_padHoriz, rData.m_padVert, 
    774828        pVisible, UString( getIntf(), rData.m_help.c_str() ) ); 
     829    m_pTheme->m_controls[rData.m_id + "_bg"] = CtrlGenericPtr( pBackground ); 
    775830 
    776831    // Compute the position of the control 
     832    const GenericRect *pRect; 
     833    GET_BOX( pRect, rData.m_panelId , pLayout); 
    777834    const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, 
    778835                                       rData.m_xPos, rData.m_yPos, 
    779836                                       pCurve->getWidth(), pCurve->getHeight(), 
    780                                        *pLayout, 
     837                                       *pRect, 
    781838                                       rData.m_xKeepRatio, rData.m_yKeepRatio ); 
    782839 
    783840    pLayout->addControl( pBackground, pos, rData.m_layer ); 
    784  
    785     m_pTheme->m_controls[rData.m_id + "_bg"] = CtrlGenericPtr( pBackground ); 
    786841 
    787842    // Get the bitmaps of the cursor 
     
    800855        UString( getIntf(), rData.m_tooltip.c_str() ), 
    801856        UString( getIntf(), rData.m_help.c_str() ) ); 
     857    m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pCursor ); 
    802858 
    803859    pLayout->addControl( pCursor, pos, rData.m_layer ); 
    804  
    805     m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pCursor ); 
    806860 
    807861    // Associate the cursor to the background 
     
    854908       fgColor, playColor, bgColor1, bgColor2, selColor, 
    855909       UString( getIntf(), rData.m_help.c_str() ), pVisible ); 
     910    m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pList ); 
    856911 
    857912    // Compute the position of the control 
     913    const GenericRect *pRect; 
     914    GET_BOX( pRect, rData.m_panelId , pLayout); 
    858915    const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, 
    859916                                       rData.m_xPos, rData.m_yPos, 
    860917                                       rData.m_width, rData.m_height, 
    861                                        *pLayout, 
     918                                       *pRect, 
    862919                                       rData.m_xKeepRatio, rData.m_yKeepRatio ); 
    863920 
    864921    pLayout->addControl( pList, pos, rData.m_layer ); 
    865  
    866     m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pList ); 
    867922} 
    868923 
     
    919974       fgColor, playColor, bgColor1, bgColor2, selColor, 
    920975       UString( getIntf(), rData.m_help.c_str() ), pVisible, pFlat ); 
     976    m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pTree ); 
    921977 
    922978    // Compute the position of the control 
     979    const GenericRect *pRect; 
     980    GET_BOX( pRect, rData.m_panelId , pLayout); 
    923981    const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, 
    924982                                       rData.m_xPos, rData.m_yPos, 
    925983                                       rData.m_width, rData.m_height, 
    926                                        *pLayout, 
     984                                       *pRect, 
    927985                                       rData.m_xKeepRatio, rData.m_yKeepRatio ); 
    928986 
    929987    pLayout->addControl( pTree, pos, rData.m_layer ); 
    930  
    931     m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pTree ); 
    932988} 
    933989 
     
    9491005        rData.m_autoResize, UString( getIntf(), rData.m_help.c_str() ), 
    9501006        pVisible ); 
     1007    m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pVideo ); 
    9511008 
    9521009    // Compute the position of the control 
     1010    const GenericRect *pRect; 
     1011    GET_BOX( pRect, rData.m_panelId , pLayout); 
    9531012    const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, 
    9541013                                       rData.m_xPos, rData.m_yPos, 
    9551014                                       rData.m_width, rData.m_height, 
    956                                        *pLayout, 
     1015                                       *pRect, 
    9571016                                       rData.m_xKeepRatio, rData.m_yKeepRatio ); 
    9581017 
    9591018    pLayout->addControl( pVideo, pos, rData.m_layer ); 
    960  
    961     m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pVideo ); 
    9621019} 
    9631020 
     
    9661023                                      const string &rRightBottom, 
    9671024                                      int xPos, int yPos, int width, 
    968                                       int height, const Box &rBox
     1025                                      int height, const GenericRect &rRect
    9691026                                      bool xKeepRatio, bool yKeepRatio ) const 
    9701027{ 
     
    9731030    Position::Ref_t refRightBottom = Position::kLeftTop; 
    9741031 
    975     int boxWidth = rBox.getWidth(); 
    976     int boxHeight = rBox.getHeight(); 
     1032    int boxWidth = rRect.getWidth(); 
     1033    int boxHeight = rRect.getHeight(); 
    9771034 
    9781035    // Position of the left top corner 
     
    10431100    } 
    10441101 
    1045     return Position( left, top, right, bottom, rBox, refLeftTop, 
     1102    return Position( left, top, right, bottom, rRect, refLeftTop, 
    10461103                     refRightBottom, xKeepRatio, yKeepRatio ); 
    10471104} 
     
    11021159            return NULL; 
    11031160        } 
    1104 #if 0 
    1105         if( x < 0 || y < 0 ) 
    1106         { 
    1107             msg_Err( getIntf(), 
    1108                      "Slider points cannot have negative coordinates!" ); 
    1109             return NULL; 
    1110         } 
    1111 #endif 
     1161 
    11121162        xBez.push_back( x ); 
    11131163        yBez.push_back( y ); 
  • modules/gui/skins2/parser/builder.hpp

    rdda858d r8086b07  
    3838class GenericFont; 
    3939class Position; 
    40 class Box
     40class GenericRect
    4141 
    4242 
     
    8080        void addCheckbox( const BuilderData::Checkbox &rData ); 
    8181        void addImage( const BuilderData::Image &rData ); 
     82        void addPanel( const BuilderData::Panel &rData ); 
    8283        void addText( const BuilderData::Text &rData ); 
    8384        void addRadialSlider( const BuilderData::RadialSlider &rData ); 
     
    9192                                     const string &rRightBottom, 
    9293                                     int xPos, int yPos, int width, int height, 
    93                                      const Box &rBox, bool xKeepRatio = false, 
     94                                     const GenericRect &rRect, 
     95                                     bool xKeepRatio = false, 
    9496                                     bool yKeepRatio = false ) const; 
    9597 
  • modules/gui/skins2/parser/builder_data.def

    rdda858d r8086b07  
    1010Layout id:string width:int height:int minWidth:int maxWidth:int minHeight:int maxHeight:int windowId:string 
    1111Anchor xPos:int yPos:int leftTop:string range:int priority:int points:string layoutId:string 
    12 Button id:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool visible:string upId:string downId:string overId:string actionId:string tooltip:string help:string layer:int windowId:string layoutId:string 
    13 Checkbox id:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool visible:string up1Id:string down1Id:string over1Id:string up2Id:string down2Id:string over2Id:string state:string action1:string action2:string tooltip1:string tooltip2:string help:string layer:int windowId:string layoutId:string 
    14 Image id:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool visible:string bmpId:string actionId:string action2Id:string resize:string help:string layer:int windowId:string layoutId:string 
     12Button id:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool visible:string upId:string downId:string overId:string actionId:string tooltip:string help:string layer:int windowId:string layoutId:string panelId:string 
     13Checkbox id:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool visible:string up1Id:string down1Id:string over1Id:string up2Id:string down2Id:string over2Id:string state:string action1:string action2:string tooltip1:string tooltip2:string help:string layer:int windowId:string layoutId:string panelId:string 
     14Image id:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool visible:string bmpId:string actionId:string action2Id:string resize:string help:string layer:int windowId:string layoutId:string panelId:string 
    1515IniFile id:string file:string 
    16 Text id:string xPos:int yPos:int visible:string fontId:string text:string width:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool color:uint32_t scrolling:string alignment:string help:string layer:int windowId:string layoutId:string 
    17 RadialSlider id:string visible:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool sequence:string nbImages:int minAngle:float maxAngle:float value:string tooltip:string help:string layer:int windowId:string layoutId:string 
    18 Slider id:string visible:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool upId:string downId:string overId:string points:string thickness:int value:string imageId:string nbHoriz:int nbVert:int padHoriz:int padVert:int tooltip:string help:string layer:int windowId:string layoutId:string 
    19 List id:string xPos:int yPos:int visible:string width:int height:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool fontId:string var:string bgImageId:string fgColor:string playColor:string bgColor1:string bgColor2:string selColor:string help:string layer:int windowId:string layoutId:string 
    20 Tree id:string xPos:int yPos:int visible:string flat:string width:int height:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool fontId:string var:string bgImageId:string itemImageId:string openImageId:string closedImageId:string fgColor:string playColor:string bgColor1:string bgColor2:string selColor:string help:string layer:int windowId:string layoutId:string 
    21 Video id:string xPos:int yPos:int width:int height:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool visible:string autoResize:bool help:string layer:int windowId:string layoutId:string 
     16Panel id:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool width:int height:int layer:int windowId:string layoutId:string panelId:string 
     17Text id:string xPos:int yPos:int visible:string fontId:string text:string width:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool color:uint32_t scrolling:string alignment:string help:string layer:int windowId:string layoutId:string panelId:string 
     18RadialSlider id:string visible:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool sequence:string nbImages:int minAngle:float maxAngle:float value:string tooltip:string help:string layer:int windowId:string layoutId:string panelId:string 
     19Slider id:string visible:string xPos:int yPos:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool upId:string downId:string overId:string points:string thickness:int value:string imageId:string nbHoriz:int nbVert:int padHoriz:int padVert:int tooltip:string help:string layer:int windowId:string layoutId:string panelId:string 
     20List id:string xPos:int yPos:int visible:string width:int height:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool fontId:string var:string bgImageId:string fgColor:string playColor:string bgColor1:string bgColor2:string selColor:string help:string layer:int windowId:string layoutId:string panelId:string 
     21Tree id:string xPos:int yPos:int visible:string flat:string width:int height:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool fontId:string var:string bgImageId:string itemImageId:string openImageId:string closedImageId:string fgColor:string playColor:string bgColor1:string bgColor2:string selColor:string help:string layer:int windowId:string layoutId:string panelId:string 
     22Video id:string xPos:int yPos:int width:int height:int leftTop:string rightBottom:string xKeepRatio:bool yKeepRatio:bool visible:string autoResize:bool help:string layer:int windowId:string layoutId:string panelId:string 
  • modules/gui/skins2/parser/builder_data.hpp

    rdda858d r8086b07  
    204204    struct Button 
    205205    { 
    206         Button( const string & id, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & visible, const string & upId, const string & downId, const string & overId, const string & actionId, const string & tooltip, const string & help, int layer, const string & windowId, const string & layoutId ): 
    207 m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_visible( visible ), m_upId( upId ), m_downId( downId ), m_overId( overId ), m_actionId( actionId ), m_tooltip( tooltip ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ) {} 
     206        Button( const string & id, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & visible, const string & upId, const string & downId, const string & overId, const string & actionId, const string & tooltip, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ): 
     207m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_visible( visible ), m_upId( upId ), m_downId( downId ), m_overId( overId ), m_actionId( actionId ), m_tooltip( tooltip ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {} 
    208208 
    209209        string m_id; 
     
    224224        string m_windowId; 
    225225        string m_layoutId; 
     226        string m_panelId; 
    226227    }; 
    227228    /// List 
     
    231232    struct Checkbox 
    232233    { 
    233         Checkbox( const string & id, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & visible, const string & up1Id, const string & down1Id, const string & over1Id, const string & up2Id, const string & down2Id, const string & over2Id, const string & state, const string & action1, const string & action2, const string & tooltip1, const string & tooltip2, const string & help, int layer, const string & windowId, const string & layoutId ): 
    234 m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_visible( visible ), m_up1Id( up1Id ), m_down1Id( down1Id ), m_over1Id( over1Id ), m_up2Id( up2Id ), m_down2Id( down2Id ), m_over2Id( over2Id ), m_state( state ), m_action1( action1 ), m_action2( action2 ), m_tooltip1( tooltip1 ), m_tooltip2( tooltip2 ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ) {} 
     234        Checkbox( const string & id, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & visible, const string & up1Id, const string & down1Id, const string & over1Id, const string & up2Id, const string & down2Id, const string & over2Id, const string & state, const string & action1, const string & action2, const string & tooltip1, const string & tooltip2, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ): 
     235m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_visible( visible ), m_up1Id( up1Id ), m_down1Id( down1Id ), m_over1Id( over1Id ), m_up2Id( up2Id ), m_down2Id( down2Id ), m_over2Id( over2Id ), m_state( state ), m_action1( action1 ), m_action2( action2 ), m_tooltip1( tooltip1 ), m_tooltip2( tooltip2 ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {} 
    235236 
    236237        string m_id; 
     
    257258        string m_windowId; 
    258259        string m_layoutId; 
     260        string m_panelId; 
    259261    }; 
    260262    /// List 
     
    264266    struct Image 
    265267    { 
    266         Image( const string & id, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & visible, const string & bmpId, const string & actionId, const string & action2Id, const string & resize, const string & help, int layer, const string & windowId, const string & layoutId ): 
    267 m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_visible( visible ), m_bmpId( bmpId ), m_actionId( actionId ), m_action2Id( action2Id ), m_resize( resize ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ) {} 
     268        Image( const string & id, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & visible, const string & bmpId, const string & actionId, const string & action2Id, const string & resize, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ): 
     269m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_visible( visible ), m_bmpId( bmpId ), m_actionId( actionId ), m_action2Id( action2Id ), m_resize( resize ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {} 
    268270 
    269271        string m_id; 
     
    283285        string m_windowId; 
    284286        string m_layoutId; 
     287        string m_panelId; 
    285288    }; 
    286289    /// List 
     
    300303 
    301304    /// Type definition 
     305    struct Panel 
     306    { 
     307        Panel( const string & id, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, int width, int height, int layer, const string & windowId, const string & layoutId, const string & panelId ): 
     308m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_width( width ), m_height( height ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {} 
     309 
     310        string m_id; 
     311        int m_xPos; 
     312        int m_yPos; 
     313        string m_leftTop; 
     314        string m_rightBottom; 
     315        bool m_xKeepRatio; 
     316        bool m_yKeepRatio; 
     317        int m_width; 
     318        int m_height; 
     319        int m_layer; 
     320        string m_windowId; 
     321        string m_layoutId; 
     322        string m_panelId; 
     323    }; 
     324    /// List 
     325    list<Panel> m_listPanel; 
     326 
     327    /// Type definition 
    302328    struct Text 
    303329    { 
    304         Text( const string & id, int xPos, int yPos, const string & visible, const string & fontId, const string & text, int width, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, uint32_t color, const string & scrolling, const string & alignment, const string & help, int layer, const string & windowId, const string & layoutId ): 
    305 m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_visible( visible ), m_fontId( fontId ), m_text( text ), m_width( width ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_color( color ), m_scrolling( scrolling ), m_alignment( alignment ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ) {} 
     330        Text( const string & id, int xPos, int yPos, const string & visible, const string & fontId, const string & text, int width, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, uint32_t color, const string & scrolling, const string & alignment, const string & help, int layer, const string & w