123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- deferred class IUP_WIDGET_CHILD
- -- Commands to handle the attributes related with the child.
- inherit
- IUP_WIDGET_INTERNALS
-
- insert
- IUP_INTERFACE
- feature {ANY}
- -- Attributes to be used inside a container.
- set_cx (cx: INTEGER)
- -- X coordinate of the position to be used inside a IUP_CBOX container.
- require
- non_negative: cx >= 0
- do
- iup_open.set_attribute(Current, "CX", cx.to_string)
- end
- get_cx: INTEGER
- -- Return the x coordinate used inside a IUP_CBOX container.
- local
- cx: STRING
- do
- cx := iup_open.get_attribute(Current, "CX")
- Result := cx.to_integer
- end
- set_cy (cy: INTEGER)
- -- Y coordinate of the position to be used inside a IUP_CBOX container.
- require
- non_negative: cy >= 0
- do
- iup_open.set_attribute(Current, "CY", cy.to_string)
- end
- get_cy: INTEGER
- -- Return the y coordinate used inside a IUP_CBOX container.
- local
- cy: STRING
- do
- cy := iup_open.get_attribute(Current, "CY")
- Result := cy.to_integer
- end
- set_expand_weight (value: INTEGER)
- -- (non inheritable) (at children only): If a child defines the expand
- -- weight, then it is used to multiply the free space used for expansion.
- do
- iup_open.set_attribute(Current, "EXPANDWEIGHT", value.to_string)
- end
- get_expand_weight: INTEGER
- -- Return the value of expandweight.
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "EXPANDWEIGHT")
- Result := str.to_integer
- end
- set_tab_title (value: STRING)
- -- (non inheritable) (at children only): Same as TABTITLEn in
- -- IUP_TABS but set in each child. Works only if set before the child is
- -- added to the tabs.
- do
- iup_open.set_attribute(Current, "TABTITLE", value)
- end
- get_tab_title: STRING
- -- Return the value of tabtitle.
- do
- Result := iup_open.get_attribute(Current, "TABTITLE")
- end
- set_tab_image (value: STRING)
- -- (non inheritable) (at children only): Same as TABIMAGEn in
- -- IUP_TABS but set in each child. Works only if set before the child is
- -- added to the tabs.
- do
- iup_open.set_attribute(Current, "TABIMAGE", value)
- end
- get_tab_image: STRING
- -- Return the value of tabimage.
- do
- Result := iup_open.get_attribute(Current, "TABIMAGE")
- end
- -- Commands to handle the hierarchy
- detach
- -- Detaches the interface element from its parent.
- do
- iup_open.iup_detach(Current)
- end
-
- get_parent: IUP_CONTAINER
- -- Return the parent of the element or void if does not have a parent.
- local
- pr: IUP_CONTAINER
- do
- if pr ?:= iup_open.iup_get_parent(Current) then
- Result ::= iup_open.iup_get_parent(Current)
- end
- end
- get_brother: IUP_WIDGET
- -- Return the next element in the parent where this element is
- -- placed or void if there is none.
-
- do
- Result := iup_open.iup_get_brother(Current)
- end
- get_dialog: IUP_DIALOG
- -- Returns the dialog that contains this interface element. Works
- -- also for children of a menu that is associated with a dialog.
- -- Returns: the dialog or void if not found.
- local
- wgt: IUP_WIDGET
- dlg: IUP_DIALOG
- do
- wgt := iup_open.iup_get_dialog(Current)
- if dlg ?:= wgt then
- dlg ::= wgt
- end
- Result := dlg
- end
- set_normalizer_group (name: STRING)
- -- (non inheritable): name of a normalizer element to which to
- -- automatically add the control. If an element with that name does not
- -- exists then one is created.
- do
- iup_open.set_attribute(Current, "NORMALIZERGROUP", name)
- end
- end
- -- The MIT License (MIT)
- -- Copyright (c) 2016, 2017, 2018 by German A. Arias
- -- Permission is hereby granted, free of charge, to any person obtaining a copy
- -- of this software and associated documentation files (the "Software"), to deal
- -- in the Software without restriction, including without limitation the rights
- -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- -- copies of the Software, and to permit persons to whom the Software is
- -- furnished to do so, subject to the following conditions:
- --
- -- The above copyright notice and this permission notice shall be included in
- -- all copies or substantial portions of the Software.
- --
- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- -- SOFTWARE.
|