1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- class IUP_SPIN
- inherit
- IUP_WIDGET
- redefine
- execute_spin
- end
- IUP_WIDGET_CHILD
- IUP_WIDGET_NAME
- IUP_WIDGET_CUSTOM_ATTRIBUTES
- create {ANY}
- spin
- feature {ANY}
- spin
-
- local
- a_spin: POINTER
- do
- a_spin := int_spin
- set_widget(a_spin)
- end
-
-
- set_cb_spin (act: detachable FUNCTION[TUPLE[IUP_SPIN, INTEGER], STRING])
-
-
-
- local
- operation: INTEGER
- do
- cb_spin := act
- if cb_spin /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "SPIN_CB", "NONEEDED", operation)
- end
- feature {IUP}
- execute_spin (inc: INTEGER): STRING
- do
- if attached cb_spin as int_cb then
- Result := int_cb.item([Current, inc])
- else
- Result := "IUP_DEFAULT"
- end
- end
- feature {NONE}
-
- cb_spin: detachable FUNCTION[TUPLE[IUP_SPIN, INTEGER], STRING]
-
- int_spin: POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupSpin();"
- end
- end
|