123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- class IUP_FLAT_SCROLL_BOX
- inherit
- IUP_CANVAS
- redefine
- set_rgb_background_color,
- set_border,
- set_can_focus,
- set_scroll_bar,
- set_wheel_drop_focus
- end
- IUP_WIDGET_CLIENTSIZE
- IUP_WIDGET_CLIENTOFFSET
- IUP_WIDGET_FLAT_SCROLL_BOX
- create {ANY}
- flat_scroll_box_empty,
- flat_scroll_box
- feature {ANY}
-
- flat_scroll_box_empty
-
- local
- a_flat_scroll_box, p: POINTER
- do
- a_flat_scroll_box := int_flat_scroll_box (p)
- set_widget(a_flat_scroll_box)
- end
- flat_scroll_box (child: IUP_WIDGET)
-
-
-
-
- local
- a_flat_scroll_box: POINTER
- do
- a_flat_scroll_box := int_flat_scroll_box (child.widget)
- set_widget(a_flat_scroll_box)
- end
-
- set_rgb_background_color (red: INTEGER; green: INTEGER; blue: INTEGER)
-
- do
- Precursor (red, green, blue)
- end
- set_border (state: BOOLEAN)
-
- do
- Precursor (state)
- end
- set_can_focus (state: BOOLEAN)
-
-
-
- do
- Precursor (state)
- end
-
- set_canvas_box (state: BOOLEAN)
-
-
- do
- iup_open.set_attribute(Current, "CANVASBOX", boolean_to_yesno(state))
- end
- set_child_offset (horizontal, vertical: INTEGER)
-
-
-
-
- local
- str: STRING
- do
- create str.make_from_string(horizontal.out)
- str.append_string("x")
- str.append_string(vertical.out)
-
- iup_open.set_attribute(Current, "CHILDOFFSET", str)
- 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_layout_drag (state: BOOLEAN)
-
-
-
- do
- iup_open.set_attribute(Current, "LAYOUTDRAG", boolean_to_yesno(state))
- end
- set_scroll_bar (state: BOOLEAN)
-
-
-
- do
- Precursor (state)
- end
- set_wheel_drop_focus (state: BOOLEAN)
-
-
- do
- Precursor (state)
- end
-
- scroll_to (x, y: INTEGER)
-
-
- local
- str: STRING
- do
- str := x.out
- str.append_string(",")
- str.append_string(y.out)
- iup_open.set_attribute(Current, "SCROLLTO", str)
- end
- scroll_to_top
- do
- iup_open.set_attribute(Current, "SCROLLTO", "TOP")
- end
- scroll_to_bottom
- do
- iup_open.set_attribute(Current, "SCROLLTO", "BOTTOM")
- end
-
- scroll_to_child (name: STRING)
-
-
-
- do
- iup_open.set_attribute(Current, "SCROLLTOCHILD", name)
- end
- scroll_to_child_widget (control: IUP_WIDGET)
-
- do
- iup_open.set_attribute_widget(Current, "SCROLLTOCHILD_HANDLE", control)
- end
- feature {NONE}
-
-
- int_flat_scroll_box (wgt: POINTER): POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupFlatScrollBox ($wgt);"
- end
- end
|