12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133 |
- class IUP_LIST
- inherit
- IUP_WIDGET
- undefine
- execute_dragbegin,
- execute_dragdatasize,
- execute_dragdata,
- execute_dragend,
- execute_dropdata,
- execute_dropmotion
- redefine
- execute_map,
- execute_unmap,
- execute_destroy,
- execute_getfocus,
- execute_killfocus,
- execute_enterwindow,
- execute_leavewindow,
- execute_k_any,
- execute_help,
- execute_action_fnsii,
- execute_caret,
- execute_dblclick,
- execute_dragdrop,
- execute_dropdown,
- execute_edit,
- execute_multiselect,
- execute_motion,
- execute_button,
- execute_dropfiles,
- execute_valuechanged
- end
- IUP_WIDGET_TEXT_CARET
- IUP_WIDGET_TEXT_COMMON
- IUP_WIDGET_TEXT_SELECTION
- IUP_WIDGET_BGCOLOR
- IUP_WIDGET_FGCOLOR
- IUP_WIDGET_SIZE
- IUP_WIDGET_ACTIVE
- IUP_WIDGET_FONT
- IUP_WIDGET_EXPAND
- IUP_WIDGET_SCREENPOSITION
- IUP_WIDGET_POSITION
- IUP_WIDGET_MAXMIN_SIZE
- IUP_WIDGET_TIP
- IUP_WIDGET_RASTERSIZE
- IUP_WIDGET_USERSIZE
- IUP_WIDGET_ZORDER
- IUP_WIDGET_VISIBLE
- IUP_WIDGET_CHILD
- IUP_WIDGET_SPACING
- redefine
- set_spacing
- end
- IUP_WIDGET_FOCUS
- IUP_WIDGET_PROPAGATEFOCUS
- IUP_WIDGET_NAME
- IUP_DRAG_AND_DROP
- IUP_WIDGET_CUSTOM_ATTRIBUTES
- create {ANY}
- list
- feature {ANY}
- list
-
- local
- a_list, p: POINTER
- do
- a_list := int_list(p)
- set_widget(a_list)
- end
-
- set_auto_hide (state: BOOLEAN)
-
- do
- iup_open.set_attribute(Current, "AUTOHIDE", boolean_to_yesno(state))
- end
- set_auto_redraw (state: BOOLEAN)
-
-
-
- do
- iup_open.set_attribute(Current, "AUTOREDRAW", boolean_to_yesno(state))
- end
- set_can_focus (state: BOOLEAN)
-
-
-
- do
- iup_open.set_attribute(Current, "CANFOCUS", boolean_to_yesno(state))
- end
- get_count: INTEGER
-
-
-
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "COUNT")
- if str.is_integer then
- Result := str.to_integer
- end
- end
- set_drag_drop_list (state: BOOLEAN)
-
-
-
-
-
- do
- iup_open.set_attribute(Current, "DRAGDROPLIST", boolean_to_yesno(state))
- end
- set_drop_files_target (state: BOOLEAN)
-
-
-
- do
- iup_open.set_attribute(Current, "DROPFILESTARGET", boolean_to_yesno(state))
- end
- set_drop_down (state: BOOLEAN)
-
-
-
-
-
- do
- iup_open.set_attribute(Current, "DROPDOWN", boolean_to_yesno(state))
- end
- set_drop_expand (state: BOOLEAN)
-
-
-
- do
- iup_open.set_attribute(Current, "DROPEXPAND", boolean_to_yesno(state))
- end
- set_edit_box (state: BOOLEAN)
-
-
- do
- iup_open.set_attribute(Current, "EDITBOX", boolean_to_yesno(state))
- end
- set_image_at (imagename: STRING; position: INTEGER)
-
-
-
-
-
-
-
-
- require
- position > 0
- local
- str: STRING
- do
- str := "IMAGE" + position.out
- iup_open.set_attribute(Current, str, imagename)
- end
- set_multiple (state: BOOLEAN)
-
-
-
- do
- iup_open.set_attribute(Current, "MULTIPLE", boolean_to_yesno(state))
- end
- set_scroll_bar (state: BOOLEAN)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- do
- iup_open.set_attribute(Current, "SCROLLBAR", boolean_to_yesno(state))
- end
- set_show_drag_drop (state: BOOLEAN)
-
-
-
- do
- iup_open.set_attribute(Current, "SHOWDRAGDROP", boolean_to_yesno(state))
- end
- set_show_drop_down (state: BOOLEAN)
-
-
- do
- iup_open.set_attribute(Current, "SHOWDROPDOWN", boolean_to_yesno(state))
- end
- set_show_image (state: BOOLEAN)
-
-
- do
- iup_open.set_attribute(Current, "SHOWIMAGE", boolean_to_yesno(state))
- end
- set_sort (state: BOOLEAN)
-
-
- do
- iup_open.set_attribute(Current, "SORT", boolean_to_yesno(state))
- end
- set_top_item (item: STRING)
-
-
- do
- iup_open.set_attribute(Current, "TOPITEM", item)
- end
- set_spacing (value: INTEGER)
-
-
-
-
- do
- Precursor (value)
- end
- set_value (value: STRING)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- do
- iup_open.set_attribute(Current, "VALUE", value)
- end
- get_value: STRING
-
- do
- Result := iup_open.get_attribute(Current, "VALUE")
- end
- set_value_string (value: STRING)
-
-
- do
- iup_open.set_attribute(Current, "VALUESTRING", value)
- end
- get_value_string (position: INTEGER): STRING
-
-
- do
- Result := iup_open.get_attribute(Current, "VALUESTRING")
- end
- set_value_masked (value: STRING)
-
-
- do
- iup_open.set_attribute(Current, "VALUEMASKED", value)
- end
- set_visible_items (value: INTEGER)
-
-
- require
- value > 0
- do
- iup_open.set_attribute(Current, "VISIBLEITEMS", value.out)
- end
- set_visible_columns (value: INTEGER)
-
-
-
-
-
- require
- value > 0
- do
- iup_open.set_attribute(Current, "VISIBLECOLUMNS", value.out)
- end
- set_visible_lines (value: INTEGER)
-
-
-
- require
- value > 0
- do
- iup_open.set_attribute(Current, "VISIBLELINES", value.out)
- end
-
-
- add_item_at (item: STRING; position: INTEGER)
-
-
-
-
- require
- position > 0
- do
- iup_open.set_attribute(Current, position.out, item)
- end
- append_item (item: STRING)
-
-
- do
- iup_open.set_attribute(Current, "APPENDITEM", item)
- end
- insert_item_at (item: STRING; position: INTEGER)
-
-
-
- require
- position > 0
- do
- iup_open.set_attribute_id(Current, "INSERTITEM", position, item)
- end
- remove_item_at (position: INTEGER)
-
-
- do
- iup_open.set_attribute(Current, "REMOVEITEM", position.out)
- end
- remove_all
-
- do
- iup_open.set_attribute(Current, "REMOVEITEM", "ALL")
- end
-
- convert_xt_to_pos (x, y: INTEGER): INTEGER
-
-
- do
- Result := iup_open.iup_convert_xy_to_pos (Current, x, y)
- end
-
-
- set_cb_map (act: detachable FUNCTION[TUPLE[IUP_LIST], STRING])
-
- local
- operation: INTEGER
- do
- cb_map := act
-
- if cb_map /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "MAP_CB", "NONEEDED", operation)
- end
- set_cb_unmap (act: detachable FUNCTION[TUPLE[IUP_LIST], STRING])
-
- local
- operation: INTEGER
- do
- cb_unmap := act
- if cb_unmap /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "UNMAP_CB", "NONEEDED", operation)
- end
- set_cb_destroy (act: detachable FUNCTION[TUPLE[IUP_LIST], STRING])
-
- local
- operation: INTEGER
- do
- cb_destroy := act
- if cb_destroy /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "DESTROY_CB", "NONEEDED", operation)
- end
- set_cb_get_focus (act: detachable FUNCTION[TUPLE[IUP_LIST], STRING])
-
-
-
-
- local
- operation: INTEGER
- do
- cb_getfocus := act
- if cb_getfocus /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "GETFOCUS_CB", "NONEEDED", operation)
- end
- set_cb_kill_focus (act: detachable FUNCTION[TUPLE[IUP_LIST], STRING])
-
-
-
- local
- operation: INTEGER
- do
- cb_killfocus := act
- if cb_killfocus /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "KILLFOCUS_CB", "NONEEDED", operation)
- end
- set_cb_enter_window (act: detachable FUNCTION[TUPLE[IUP_LIST], STRING])
-
- local
- operation: INTEGER
- do
- cb_enterwindow := act
- if cb_enterwindow /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "ENTERWINDOW_CB", "NONEEDED", operation)
- end
- set_cb_leave_window (act: detachable FUNCTION[TUPLE[IUP_LIST], STRING])
-
- local
- operation: INTEGER
- do
- cb_leavewindow := act
- if cb_leavewindow /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "LEAVEWINDOW_CB", "NONEEDED", operation)
- end
- set_cb_k_any (act: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER], STRING])
-
-
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_k_any := act
- if cb_k_any /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "K_ANY", "NONEEDED", operation)
- end
- set_cb_help (act: detachable PROCEDURE[TUPLE[IUP_LIST]])
-
-
-
-
- local
- operation: INTEGER
- do
- cb_help := act
- if cb_help /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "HELP_CB", "NONEEDED", operation)
- end
-
- set_cb_action (act: detachable FUNCTION[TUPLE[IUP_LIST, STRING, INTEGER, INTEGER], STRING])
-
-
-
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_action := act
- if cb_action /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "ACTION", "Fnsii", operation)
- end
- set_cb_button (act: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, INTEGER, INTEGER, INTEGER, STRING], STRING])
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_button := act
- if cb_button /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "BUTTON_CB", "NONEEDED", operation)
- end
- set_cb_caret (act: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, INTEGER, INTEGER], STRING])
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_caret := act
- if cb_caret /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "CARET_CB", "NONEEDED", operation)
- end
- set_cb_double_click (act: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, STRING], STRING])
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_dblclick := act
- if cb_dblclick /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "DBLCLICK_CB", "NONEEDED", operation)
- end
- set_cb_drag_drop (act: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, INTEGER, INTEGER, INTEGER], STRING])
-
-
-
-
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_dragdrop := act
- if cb_dragdrop /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "DRAGDROP_CB", "NONEEDED", operation)
- end
- set_cb_drop_down (act: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER], STRING])
-
-
-
-
- local
- operation: INTEGER
- do
- cb_dropdown := act
- if cb_dropdown /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "DROPDOWN_CB", "NONEEDED", operation)
- end
- set_cb_drop_files (act: detachable FUNCTION[TUPLE[IUP_LIST, STRING, INTEGER, INTEGER, INTEGER], STRING])
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_dropfiles := act
- if cb_dropfiles /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "DROPFILES_CB", "NONEEDED", operation)
- end
- set_cb_edit (act: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, STRING], STRING])
-
-
-
-
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_edit := act
- if cb_edit /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "EDIT_CB", "NONEEDED", operation)
- end
- set_cb_motion (act: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, INTEGER, STRING], STRING])
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_motion := act
- if cb_motion /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "MOTION_CB", "NONEEDED", operation)
- end
- set_cb_multi_select (act: detachable FUNCTION[TUPLE[IUP_LIST, STRING], STRING])
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_multiselect := act
- if cb_multiselect /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "MULTISELECT_CB", "NONEEDED", operation)
- end
- set_cb_value_changed (act: detachable FUNCTION[TUPLE[IUP_LIST], STRING])
-
- local
- operation: INTEGER
- do
- cb_valuechanged := act
- if cb_valuechanged /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "VALUECHANGED_CB", "NONEEDED", operation)
- end
- feature {IUP}
- execute_map: STRING
- do
- if attached cb_map as int_cb then
- Result := int_cb.item([Current])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_unmap: STRING
- do
- if attached cb_unmap as int_cb then
- Result := int_cb.item([Current])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_destroy: STRING
- do
- if attached cb_destroy as int_cb then
- Result := int_cb.item([Current])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_getfocus: STRING
- do
- if attached cb_getfocus as int_cb then
- Result := int_cb.item([Current])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_killfocus: STRING
- do
- if attached cb_killfocus as int_cb then
- Result := int_cb.item([Current])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_enterwindow: STRING
- do
- if attached cb_enterwindow as int_cb then
- Result := int_cb.item([Current])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_leavewindow: STRING
- do
- if attached cb_leavewindow as int_cb then
- Result := int_cb.item([Current])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_k_any (c: INTEGER): STRING
- do
- if attached cb_k_any as int_cb then
- Result := int_cb.item([Current, c])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_help
- do
- if attached cb_help as int_cb then
- int_cb.call([Current])
- end
- end
- execute_action_fnsii (text: STRING; item, state: INTEGER): STRING
- do
- if attached cb_action as int_cb then
- Result := int_cb.item([Current, text, item, state])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_button (btn, pressed, x, y: INTEGER; status: STRING): STRING
- do
- if attached cb_button as int_cb then
- Result := int_cb.item([Current, btn, pressed, x, y, status])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_caret (lin, col, pos: INTEGER): STRING
- do
- if attached cb_caret as int_cb then
- Result := int_cb.item([Current, lin, col, pos])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_dblclick (item: INTEGER; text: STRING): STRING
- do
- if attached cb_dblclick as int_cb then
- Result := int_cb.item([Current, item, text])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_dragdrop (drag_id, drop_id, isshift, iscontrol: INTEGER): STRING
- do
- if attached cb_dragdrop as int_cb then
- Result := int_cb.item([Current, drag_id, drop_id, isshift, iscontrol])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_dropdown (state: INTEGER): STRING
- do
- if attached cb_dropdown as int_cb then
- Result := int_cb.item([Current, state])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_dropfiles (filename: STRING; num: INTEGER; x: INTEGER; y: INTEGER): STRING
- do
- if attached cb_dropfiles as int_cb then
- Result := int_cb.item([Current, filename, num, x, y])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_edit (c: INTEGER; new_value: STRING): STRING
- do
- if attached cb_edit as int_cb then
- Result := int_cb.item([Current, c, new_value])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_motion (x, y: INTEGER; status: STRING): STRING
- do
- if attached cb_motion as int_cb then
- Result := int_cb.item([Current, x, y, status])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_multiselect (value: STRING): STRING
- do
- if attached cb_multiselect as int_cb then
- Result := int_cb.item([Current, value])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_valuechanged: STRING
- do
- if attached cb_valuechanged as int_cb then
- Result := int_cb.item([Current])
- else
- Result := "IUP_DEFAULT"
- end
- end
-
- feature {NONE}
-
-
- cb_map: detachable FUNCTION[TUPLE[IUP_LIST], STRING]
- cb_unmap: detachable FUNCTION[TUPLE[IUP_LIST], STRING]
- cb_destroy: detachable FUNCTION[TUPLE[IUP_LIST], STRING]
- cb_getfocus: detachable FUNCTION[TUPLE[IUP_LIST], STRING]
- cb_killfocus: detachable FUNCTION[TUPLE[IUP_LIST], STRING]
- cb_enterwindow: detachable FUNCTION[TUPLE[IUP_LIST], STRING]
- cb_leavewindow: detachable FUNCTION[TUPLE[IUP_LIST], STRING]
- cb_k_any: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER], STRING]
- cb_help: detachable PROCEDURE[TUPLE[IUP_LIST]]
- cb_action: detachable FUNCTION[TUPLE[IUP_LIST, STRING, INTEGER, INTEGER], STRING]
- cb_button: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, INTEGER, INTEGER, INTEGER, STRING], STRING]
- cb_caret: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, INTEGER, INTEGER], STRING]
- cb_dblclick: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, STRING], STRING]
- cb_dragdrop: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, INTEGER, INTEGER, INTEGER], STRING]
- cb_dropdown: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER], STRING]
- cb_dropfiles: detachable FUNCTION[TUPLE[IUP_LIST, STRING, INTEGER, INTEGER, INTEGER], STRING]
- cb_edit: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, STRING], STRING]
- cb_motion: detachable FUNCTION[TUPLE[IUP_LIST, INTEGER, INTEGER, STRING], STRING]
- cb_multiselect: detachable FUNCTION[TUPLE[IUP_LIST, STRING], STRING]
- cb_valuechanged: detachable FUNCTION[TUPLE[IUP_LIST], STRING]
-
-
- int_list (wgt: POINTER): POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupList ($wgt);"
- end
- end
|