123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- class IUP_BACKGROUND_BOX
-
- inherit
- IUP_CANVAS
- redefine
- set_border,
- set_can_focus
- end
- IUP_WIDGET_CLIENTSIZE
- IUP_WIDGET_CLIENTOFFSET
- IUP_WIDGET_DECORATION
- IUP_WIDGET_BGCOLOR
- IUP_WIDGET_BACK_IMAGE_0
- create {ANY}
- background_box_empty,
- background_box
- feature {ANY}
- background_box_empty
- local
- a_background_box, p: POINTER
- do
- a_background_box := int_background_box (p)
- set_widget(a_background_box)
- end
- background_box (child: IUP_WIDGET)
- local
- a_background_box: POINTER
- do
- a_background_box := int_background_box (child.widget)
- set_widget(a_background_box)
- end
-
-
- set_border (state: BOOLEAN)
-
- do
- Precursor(state)
- end
- has_border: BOOLEAN
-
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "BORDER")
- Result := yesno_to_boolean(str)
- end
- set_canvas_box (state: BOOLEAN)
-
-
- do
- iup_open.set_attribute(Current, "CANVASBOX", boolean_to_yesno(state))
- end
- set_child_offset (dx, dy: INTEGER)
-
-
-
-
-
- require
- non_negative: dx >= 0
- dy >= 0
- local
- size: STRING
- do
- size := dx.out
- size.append_string("x")
- size.append_string(dy.out)
- iup_open.set_attribute(Current, "CHILDOFFSET", size)
- end
- get_child_offset: TUPLE[INTEGER, INTEGER]
-
- local
- offset: STRING
- do
- offset := iup_open.get_attribute(Current, "CHILDOFFSET")
- Result := components_of_size(offset)
- end
- set_can_focus (state: BOOLEAN)
-
- do
- Precursor (state)
- end
- feature {NONE}
-
- int_background_box (child: POINTER): POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupBackgroundBox ($child);"
- end
- end
-
|