123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- class IUP_CBOX
- -- Container for position elements in absolute coordinates. It is a
- -- concrete layout container.
- -- The IupCbox is equivalent of a IUP_VBOX or IUP_HBOX where all the
- -- children have the FLOATING attribute set to YES, but children must use
- -- CX and CY attributes instead of the POSITION attribute.
- inherit
- IUP_CONTAINER
- IUP_WIDGET_EXPAND
- IUP_WIDGET_SIZE
- IUP_WIDGET_RASTERSIZE
- IUP_WIDGET_USERSIZE
- IUP_WIDGET_WID
- IUP_WIDGET_FONT
- IUP_WIDGET_CLIENTSIZE
- IUP_WIDGET_CLIENTOFFSET
- IUP_WIDGET_POSITION
- IUP_WIDGET_MAXMIN_SIZE
- IUP_WIDGET_CHILD
- IUP_WIDGET_NAME
- IUP_WIDGET_CUSTOM_ATTRIBUTES
- create {ANY}
- cbox_empty,
- cbox
-
- feature {ANY}
-
- cbox_empty
- -- Create an empty cbox
- local
- p, a_cbox: POINTER
- do
- a_cbox := int_cbox_empty (p)
- set_widget(a_cbox)
- end
-
- cbox (col: ARRAY[IUP_WIDGET])
- -- Create a new cbox containing the list of widgets
- local
- i: INTEGER; arg: ARRAY[POINTER]; s: IUP_WIDGET; a_cbox: POINTER
- do
- i := col.count
- create arg.make_filled(default_pointer, 1, i + 1)
- i := 0
-
- across
- col as ic
- loop
- i := i + 1
- s := ic.item
- arg.put(s.widget, i)
- end
- a_cbox := int_cbox (get_pointer(arg.to_c))
- set_widget(a_cbox)
- end
-
- feature {NONE}
- -- Internals
-
- int_cbox_empty (arguments: POINTER): POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupCbox ($arguments)"
- end
-
- int_cbox (arguments: POINTER): POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupCboxv ($arguments);"
- end
-
- end -- class IUP_CBOX
- -- The MIT License (MIT)
- -- Copyright (c) 2016, 2017, 2019, 2020 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.
|