Definition: |
include pGUI.e
Ihandle ih = IupGLExpander(Ihandln child=NULL, string attributes="", sequence data={}) |
Description: |
Creates an embedded OpenGL container that can interactively show or hide its child. It inherits from IupGLSubCanvas. It exists only inside an IupGLCanvasBox. child: Identifier of an interface element. It can be NULL. For more information on the attributes and data parameters see IupSetAttributes. Returns: the identifier of the created element. |
Notes: |
The container can be created with no elements and be dynamic filled using IupAppend() or IupInsert.
When the TITLE is defined and BARPOSITION=TOP then the expand/collapse symbol is left aligned. In all other situations the expand/collapse symbol is centered. |
Attributes: | The IupGLExpander element handles all attributes defined for a IupGLSubCanvas control. |
BACKCOLOR | (non inheritable) background color of the title area. Default: "50 100 150". |
BARPOSITION |
indicates the bar handler position. Possible values are "TOP", "BOTTOM", "LEFT" or "RIGHT". Default: "TOP". |
BARSIZE | (non inheritable) controls the size of the bar handler. Default: the height of a text line plus 5 pixels. |
EXPAND | (non inheritable) the default value is "YES". |
EXTRABUTTONS |
(non inheritable) sets the number of extra image buttons at right when BARPOSITION=TOP. The maximum number of buttons is 3. See the EXTRABUTTON_CB callback. Default: 0. IMAGEEXTRAid: image name used for the button. id can be 1, 2 or 3. 1 is the rightmost button, and count from right to left. IMAGEEXTRAPRESSid: image name used for the button when pressed. IMAGEEXTRAHIGHLIGHTid: image name for the button used when mouse is over the button area. All images must be 16x16, or smaller but the occupied size will still be 16x16. |
FORECOLOR | (non inheritable) text and arrow color. Default: "255 255 255". |
HIGHCOLOR | (non inheritable) text and arrow color when highlight. Default: "200 225 245". |
IMAGE |
(non inheritable) image name to replace the arrow by an image STATE=CLOSE. Works only when BARPOSITION=TOP. The minimum horizontal space reserved for the handler is 20 pixels. Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage. IMAGEOPEN: image name used when STATE=OPEN. IMAGEHIGHLIGHT: image name used when mouse is over the bar handler and STATE=CLOSE. IMAGEOPENHIGHLIGHT: image name used when mouse is over the bar handler and STATE=OPEN. |
MOVEABLE | (non inheritable) enable the frame to be interactively moved when it is a direct child of the IupGLCanvasBox. Default: NO. |
MOVETOTOP | (non inheritable) when MOVEABLE=Yes and the frame is moved then its ZORDER is also set to TOP. (Since 3.11.1) |
PRESSCOLOR | (non inheritable) text and arrow color when pressed. Default: "150 200 235". |
STATE |
(non inheritable) Show or hide the container elements. Possible values: "OPEN" (expanded) or "CLOSE" (collapsed). Default: OPEN. Setting this attribute will automatically change the layout of the entire dialog so the child can be recomposed. |
TITLE |
(non inheritable) title text, shown in the title bar near the expand or collapse symbol. Shown only when BARPOSITION=TOP. |
TITLEBACKIMAGE |
(non inheritable) image name to be used as a background of the title area. It will be zoomed to fill the background (it does not includes the border). Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage. (Since 3.11.1) |
TITLEBACKIMAGEINACTIVE |
(non inheritable) background image name of the element when inactive. If it is not defined then the TITLEBACKIMAGE is used and its colors will be replaced by a modified version creating the disabled effect. (Since 3.11.2) |
also | CLIENTSIZE, CLIENTOFFSET: also accepted. |
Callbacks | The IupGLExpander element handles all callbacks defined for the IupGLSubCanvas control. |
ACTION |
Action generated after the expander state is interactively changed.
function action_cb(Ihandle ih) ih: identifier of the element that activated the event. |
MOVE_CB |
Called after the frame was moved on the IupGLCanvasBox, when MOVEABLE=Yes. The coordinates are the same as the POSITION attribute. function move_cb(Ihandle ih, integer x, y) ih: identifier of the element that activated the event. x, y: coordinates of the new position. |
OPENCLOSE_CB |
Action generated before the expander state is interactively changed.
function openclose_cb(Ihandle ih, integer state) ih: identifier of the element that activated the event. state: new state to be applied. Returns: if return IUP_IGNORE the new state is ignored. |
EXTRABUTTON_CB |
Action generated when any mouse button is pressed and released.
function extrabutton_cb(Ihandle ih, integer button, pressed) ih: identifies the element that activated the event. button: identifies the extra button. can be 1, 2 or 3. (this is not the same as BUTTON_CB) pressed: indicates the state of the button: 0 - mouse button was released; |