123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- class IUP_ZBOX
- inherit
- IUP_CONTAINER
- IUP_WIDGET_CUSTOM_ATTRIBUTES
- 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_CHILDSIZEALL
-
- create {ANY}
- zbox_empty,
- zbox
-
- feature {ANY}
- zbox_empty
-
- local
- p, a_zbox: POINTER
- do
- a_zbox := int_zbox_empty (p)
- set_widget(a_zbox)
- end
-
- zbox (col: ARRAY[IUP_WIDGET])
-
- local
- i: INTEGER; arg: ARRAY[POINTER]; s: IUP_WIDGET; a_zbox: 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_zbox := int_zbox (get_pointer(arg.to_c))
- set_widget(a_zbox)
- end
-
- set_alignment (value: STRING)
-
-
-
- require
- is_valid: is_valid_alignment(value)
- do
- iup_open.set_attribute(Current, "ALIGNMENT", value)
- end
-
- get_alignment: STRING
-
- do
- Result := iup_open.get_attribute(Current, "ALIGNMENT")
- end
- set_value (name: STRING)
-
-
-
-
-
- do
- iup_open.set_attribute(Current, "VALUE", name)
- end
-
- get_value: STRING
-
- do
- Result := iup_open.get_attribute(Current, "VALUE")
- end
- set_value_widget (wgt: IUP_WIDGET)
-
-
-
-
- do
- iup_open.set_attribute_widget(Current, "VALUE_HANDLE", wgt)
- end
- get_value_widget: IUP_WIDGET
-
- do
- Result := iup_open.get_attribute_widget(Current, "VALUE_HANDLE")
- end
-
- set_value_position (pos: INTEGER)
-
-
-
-
- require
- pos >= 0
- do
- iup_open.set_attribute(Current, "VALUEPOS", pos.out)
- end
-
- get_value_position: INTEGER
-
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "VALUEPOS")
- Result := str.to_integer
- end
-
- is_valid_alignment (value: STRING): BOOLEAN
- do
- if value.is_equal("NORTH") or
- value.is_equal("SOUTH") or
- value.is_equal("WEST") or
- value.is_equal("EAST") or
- value.is_equal("NE") or
- value.is_equal("SE") or
- value.is_equal("NW") or
- value.is_equal("SW") or
- value.is_equal("ACENTER") then
- Result := True
- else
- Result := False
- end
- end
- feature {NONE}
-
-
- int_zbox_empty (arguments: POINTER): POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupZbox ($arguments);"
- end
-
- int_zbox (arguments: POINTER): POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupZboxv ($arguments);"
- end
- end
|