12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796 |
- class IUP_TREE
- 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_button,
- execute_motion,
- execute_dropfiles,
- execute_dragdrop,
- execute_rightclick,
- execute_selection,
- execute_multiselection,
- execute_multiunselection,
- execute_branchopen,
- execute_branchclose,
- execute_executeleaf,
- execute_showrename,
- execute_rename,
- execute_noderemoved,
- execute_togglevalue
- end
- IUP_WIDGET_BGCOLOR
- IUP_WIDGET_EXPAND
- IUP_WIDGET_FGCOLOR
- IUP_WIDGET_ACTIVE
- IUP_WIDGET_FONT
- IUP_WIDGET_SCREENPOSITION
- IUP_WIDGET_POSITION
- IUP_WIDGET_MAXMIN_SIZE
- IUP_WIDGET_TIP
- IUP_WIDGET_SIZE
- IUP_WIDGET_RASTERSIZE
- IUP_WIDGET_USERSIZE
- IUP_WIDGET_VISIBLE
- IUP_WIDGET_ZORDER
- IUP_WIDGET_TITLE
- IUP_WIDGET_SPACING
- redefine
- set_spacing
- end
- IUP_WIDGET_CHILD
- IUP_WIDGET_NAME
- IUP_WIDGET_FOCUS
- IUP_WIDGET_PROPAGATEFOCUS
- IUP_DRAG_AND_DROP
- IUP_WIDGET_CUSTOM_ATTRIBUTES
- create {ANY}
- tree
- feature {ANY}
- tree
-
- local
- a_tree: POINTER
- do
- a_tree := int_tree
- set_widget(a_tree)
- end
-
- set_add_expanded (state: BOOLEAN)
-
-
-
-
- do
- iup_open.set_attribute(Current, "ADDEXPANDED", boolean_to_yesno(state))
- end
- set_add_root (state: BOOLEAN)
-
-
- do
- iup_open.set_attribute(Current, "ADDROOT", 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
- set_drag_drop_tree (state: BOOLEAN)
-
-
-
-
-
- do
- iup_open.set_attribute(Current, "DRAGDROPTREE", boolean_to_yesno(state))
- end
- set_as_drop_files_target (state: BOOLEAN)
-
-
-
-
- do
- iup_open.set_attribute(Current, "DROPFILESTARGET", boolean_to_yesno(state))
- end
- set_drop_equal_drag (state: BOOLEAN)
-
-
-
-
- do
- iup_open.set_attribute(Current, "DROPEQUALDRAG", boolean_to_yesno(state))
- end
- set_empty_as_3state (state: BOOLEAN)
-
-
-
- do
- iup_open.set_attribute(Current, "EMPTYAS3STATE", boolean_to_yesno(state))
- end
- set_hide_buttons (state: BOOLEAN)
-
-
-
- do
- iup_open.set_attribute(Current, "HIDEBUTTONS", boolean_to_yesno(state))
- end
- set_hide_lines (state: BOOLEAN)
-
-
- do
- iup_open.set_attribute(Current, "HIDELINES", boolean_to_yesno(state))
- end
- set_rgb_highlight_color (red: INTEGER; green: INTEGER; blue: INTEGER)
-
-
- do
- iup_open.set_attribute(Current, "HLCOLOR", rgb_to_string(red, green, blue))
- end
- set_hexadecimal_highlight_color (color: STRING)
-
-
- local
- tup: TUPLE[INTEGER, INTEGER, INTEGER]
- do
- tup := hexadecimal_to_rgb(color)
- set_rgb_highlight_color(tup.integer_32_item(1), tup.integer_32_item(2), tup.integer_32_item(3))
- end
- reset_highlight_color
-
- do
- iup_open.reset_attribute(Current, "HLCOLOR")
- end
- set_indentation (value: INTEGER)
-
-
-
-
- require
- value >= 0
- do
- iup_open.set_attribute(Current, "INDENTATION", value.out)
- end
- set_info_tip (state: BOOLEAN)
-
-
-
-
- do
- iup_open.set_attribute(Current, "INFOTIP", 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_toggle (state: STRING)
-
-
-
-
- do
- iup_open.set_attribute(Current, "SHOWTOGGLE", state)
- end
- set_spacing (value: INTEGER)
-
-
- do
- Precursor (value)
- end
- set_top_item (value: INTEGER)
-
-
-
- do
- iup_open.set_attribute(Current, "TOPITEM", value.out)
- 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
- get_child_count_at (id: INTEGER): INTEGER
- require
- id >= 0
- local
- str: STRING
- do
- str := iup_open.get_attribute_id(Current, "CHILDCOUNT", id)
- if str.is_integer then
- Result := str.to_integer
- end
- end
-
- get_total_child_count_at (id: INTEGER): INTEGER
-
-
- require
- id >= 0
- local
- str: STRING
- do
- str := iup_open.get_attribute_id(Current, "TOTALCHILDCOUNT", id)
- if str.is_integer then
- Result := str.to_integer
- end
- end
- get_root_count: INTEGER
-
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "ROOTCOUNT")
- if str.is_integer then
- Result := str.to_integer
- end
- end
- set_rgb_color_at (red, green, blue, id: INTEGER;)
-
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "COLOR", id, rgb_to_string(red, green, blue))
- end
- get_depth_at (id: INTEGER): INTEGER
-
-
-
- require
- id >= 0
- local
- str: STRING
- do
- str := iup_open.get_attribute_id(Current, "DEPTH", id)
-
- if str.is_integer then
- Result := str.to_integer
- end
- end
- get_kind_at (id: INTEGER): STRING
-
-
-
-
- require
- id >= 0
- do
- Result := iup_open.get_attribute_id(Current, "KIND", id)
- end
- get_parent_at (id: INTEGER): INTEGER
-
- require
- id >= 0
- local
- str: STRING
- do
- str := iup_open.get_attribute_id(Current, "PARENT", id)
-
- if str.is_integer then
- Result := str.to_integer
- end
- end
- get_next_at (id: INTEGER): STRING
-
-
-
- require
- id >= 0
- do
- Result := iup_open.get_attribute_id(Current, "NEXT", id)
- end
- get_previous_at (id: INTEGER): STRING
-
-
-
- require
- id >= 0
- do
- Result := iup_open.get_attribute_id(Current, "PREVIOUS", id)
- end
- get_last_at (id: INTEGER): STRING
-
- require
- id >= 0
- do
- Result := iup_open.get_attribute_id(Current, "LAST", id)
- end
- get_first_at (id: INTEGER): STRING
-
-
- require
- id >= 0
- do
- Result := iup_open.get_attribute_id(Current, "FIRST", id)
- end
- set_state_at (state: STRING; id: INTEGER)
- require
- is_valid_state(state)
- id >= 0
- do
- iup_open.set_attribute_id(Current, "STATE", id, state)
- end
- get_state_at (id: INTEGER): STRING
-
- require
- id >= 0
- do
- Result := iup_open.get_attribute_id(Current, "STATE", id)
- end
- set_title_at (title: STRING; id: INTEGER)
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "TITLE", id, title)
- end
- get_title_at (id: INTEGER): STRING
-
- require
- id >= 0
- do
- Result := iup_open.get_attribute_id(Current, "TITLE", id)
- end
- set_title_font_at (font: STRING; id: INTEGER)
-
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "TITLEFONT", id, font)
- end
- set_title_font_style_at (style: STRING; id: INTEGER)
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "TITLEFONTSTYLE", id, style)
- end
- set_title_font_size_at (size, id: INTEGER)
-
- require
- size > 0
- id >= 0
- do
- iup_open.set_attribute_id(Current, "TITLEFONTSIZE", id, size.out)
- end
- set_toggle_value_at (value: STRING; id: INTEGER)
-
-
- require
- is_valid_toggle (value)
- id >= 0
- do
- iup_open.set_attribute_id(Current, "VALUE", id, value)
- end
- set_toggle_visible_at (state: BOOLEAN; id: INTEGER)
-
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "TOGGLEVISIBLE", id, boolean_to_yesno(state))
- end
- set_user_data_at (data: STRING; id: INTEGER)
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "USERDATA", id, data)
- end
- get_user_data_at (id: INTEGER): STRING
-
- require
- id >= 0
- do
- Result := iup_open.get_attribute_id(Current, "USERDATA", id)
- end
-
- set_image_at (image: STRING; id: INTEGER)
-
-
-
-
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "IMAGE", id, image)
- end
- set_image_expanded_at (image: STRING; id: INTEGER)
-
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "IMAGEEXPANDED", id, image)
- end
- set_image_leaf(image: STRING)
-
-
-
- do
- iup_open.set_attribute(Current, "IMAGELEAF", image)
- end
- set_image_branch_collapsed (image: STRING)
-
-
-
- do
- iup_open.set_attribute(Current, "IMAGEBRANCHCOLLAPSED", image)
- end
- set_image_branch_expanded (image: STRING)
-
-
-
- do
- iup_open.set_attribute(Current, "IMAGEBRANCHEXPANDED", image)
- end
-
- set_value (id: INTEGER)
-
-
-
-
- require
- id >= 0
- do
- iup_open.set_attribute(Current, "VALUE", id.out)
- end
- get_value: INTEGER
-
-
-
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "VALUE")
- if str.is_integer then
- Result := str.to_integer
- end
- end
-
- select_first
-
- do
- iup_open.set_attribute(Current, "VALUE", "FIRST")
- end
- select_last
-
- do
- iup_open.set_attribute(Current, "VALUE", "LAST")
- end
- select_next
-
- do
- iup_open.set_attribute(Current, "VALUE", "NEXT")
- end
- select_previous
-
- do
- iup_open.set_attribute(Current, "VALUE", "PREVIOUS")
- end
- select_page_down
-
-
- do
- iup_open.set_attribute(Current, "VALUE", "PGDN")
- end
- select_page_up
-
-
- do
- iup_open.set_attribute(Current, "VALUE", "PGUP")
- end
- clear
-
- do
- iup_open.set_attribute(Current, "VALUE", "CLEAR")
- end
-
- set_mark (first, last: INTEGER)
-
-
- require
- first >= 0
- last >= 0
- local
- str: STRING
- do
- str := first.out
- str.append_string("-")
- str.append_string(last.out
- )
- iup_open.set_attribute(Current, "MARK", str)
- end
- invert_mark_at (id: INTEGER)
-
-
-
- require
- id >= 0
- local
- str: STRING
- do
- str := "INVERT"
- str.append_string(id.out)
-
- iup_open.set_attribute(Current, "MARK", str)
- end
- mark_block
-
-
- do
- iup_open.set_attribute(Current, "MARK", "BLOCK")
- end
- clear_all
-
- do
- iup_open.set_attribute(Current, "MARK", "CLEARALL")
- end
- mark_all
-
- do
- iup_open.set_attribute(Current, "MARK", "MARKALL")
- end
- invert_all
-
- do
- iup_open.set_attribute(Current, "MARK", "INVERTALL")
- end
- set_marked_at (state: BOOLEAN; id: INTEGER)
-
-
-
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "MARKED", id, boolean_to_yesno(state))
- end
- get_marked_at (id: INTEGER): BOOLEAN
-
- local
- str: STRING
- do
- str := iup_open.get_attribute_id(Current, "MARKED", id)
- Result := yesno_to_boolean(str)
- end
- set_marked_nodes (value: STRING)
-
-
-
-
-
- do
- iup_open.set_attribute(Current, "MARKEDNODES", value)
- end
- get_marked_nodes: STRING
-
-
-
- do
- Result := iup_open.get_attribute(Current, "MARKEDNODES")
- end
- set_mark_mode (value: STRING)
-
-
- require
- is_valid_mode(value)
- do
- iup_open.set_attribute(Current, "MARKMODE", value)
- end
- set_mark_start (id: INTEGER)
-
-
-
- require
- id >= 0
- do
- iup_open.set_attribute(Current, "MARKSTART", id.out)
- end
- set_mark_when_toggle (state: BOOLEAN)
-
-
-
- do
- iup_open.set_attribute(Current, "MARKWHENTOGGLE", boolean_to_yesno(state))
- end
-
- add_leaf_at (value: STRING; id: INTEGER)
-
-
-
-
-
-
-
-
-
-
-
-
- require
- id >= -2
- do
- iup_open.set_attribute_id(Current, "ADDLEAF", id, value)
- end
- get_last_added_node: INTEGER
-
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "LASTADDNODE")
- if str.is_integer then
- Result := str.to_integer
- end
- end
- add_branch_at (value: STRING; id: INTEGER)
-
-
-
- require
- id >= -2
- do
- iup_open.set_attribute_id(Current, "ADDBRANCH", id, value)
- end
- copy_node_to (node_id, target_id: INTEGER)
-
-
-
-
-
-
-
-
- require
- node_id >= 0
- target_id >= 0
- do
- iup_open.set_attribute_id(Current, "COPYNODE", node_id, target_id.out)
- end
- delete_all_nodes
-
- do
- iup_open.set_attribute_id(Current, "DELNODE", 1, "ALL")
- end
- delete_node_at (id: INTEGER)
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "DELNODE", id, "SELECTED")
- end
- delete_node_children_at (id: INTEGER)
-
- require
- id >= 0
- do
- iup_open.set_attribute_id(Current, "DELNODE", id, "CHILDREN")
- end
- delete_selected_nodes
-
- do
- iup_open.set_attribute_id(Current, "DELNODE", 1, "MARKED")
- end
- expand_all
-
- do
- iup_open.set_attribute(Current, "EXPANDALL", "YES")
- end
- contract_all
-
- do
- iup_open.set_attribute(Current, "EXPANDALL", "NO")
- end
- insert_leaf_at (value: STRING; id: INTEGER)
-
-
-
-
-
-
- require
- id >= -2
- do
- iup_open.set_attribute_id(Current, "INSERTLEAF", id, value)
- end
- insert_branch_at (value: STRING; id: INTEGER)
-
-
-
- require
- id >= -2
- do
- iup_open.set_attribute_id(Current, "INSERTBRANCH", id, value)
- end
- move_node_at (node_id, target_id: INTEGER)
-
-
-
-
-
-
-
-
- require
- node_id >= 0
- target_id >= 0
- do
- iup_open.set_attribute_id(Current, "MOVENODE", node_id, target_id.out)
- end
-
- start_rename
-
-
- do
- iup_open.set_attribute(Current, "RENAME", "YES")
- end
- set_rename_position (position: INTEGER)
-
-
-
- require
- position >= 1
- do
- iup_open.set_attribute(Current, "RENAMEPOSITION", position.out)
- end
- set_rename_selection (col1, col2: INTEGER)
-
-
-
-
-
-
-
-
-
- local
- str: STRING
- do
- create str.make_from_string(col1.out)
- str.append_string(":")
- str.append_string(col2.out)
-
- iup_open.set_attribute(Current, "RENAMESELECTION", str)
- end
- set_show_rename (state: BOOLEAN)
-
-
-
-
- do
- iup_open.set_attribute(Current, "SHOWRENAME", boolean_to_yesno(state))
- end
-
- convert_xy_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_TREE], 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_TREE], 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_TREE], 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_TREE], 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_TREE], 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_TREE], 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_TREE], 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_TREE, 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_TREE]])
-
-
-
-
- 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_button (act: detachable FUNCTION[TUPLE[IUP_TREE, 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_motion (act: detachable FUNCTION[TUPLE[IUP_TREE, 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_drop_files (act: detachable FUNCTION[TUPLE[IUP_TREE, 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_drag_drop (act: detachable FUNCTION[TUPLE[IUP_TREE, 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_right_click (act: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING])
-
-
-
-
- local
- operation: INTEGER
- do
- cb_rightclick := act
- if cb_rightclick /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "RIGHTCLICK_CB", "NONEEDED", operation)
- end
- set_cb_selection (act: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER, INTEGER], STRING])
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_selection := act
- if cb_selection /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "SELECTION_CB", "NONEEDED", operation)
- end
- set_cb_multi_selection (act: detachable FUNCTION[TUPLE[IUP_TREE, POINTER, INTEGER], STRING])
-
-
-
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_multiselection := act
- if cb_multiselection /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "MULTISELECTION_CB", "NONEEDED", operation)
- end
- set_cb_multi_unselection (act: detachable FUNCTION[TUPLE[IUP_TREE, POINTER, INTEGER], STRING])
- local
- operation: INTEGER
- do
- cb_multiunselection := act
- if cb_multiunselection /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "MULTIUNSELECTION_CB", "NONEEDED", operation)
- end
- set_cb_branch_open (act: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING])
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_branchopen := act
- if cb_branchopen /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "BRANCHOPEN_CB", "NONEEDED", operation)
- end
- set_cb_branch_close (act: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING])
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_branchclose := act
- if cb_branchclose /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "BRANCHCLOSE_CB", "NONEEDED", operation)
- end
- set_cb_execute_leaf (act: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING])
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_executeleaf := act
- if cb_executeleaf /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "EXECUTELEAF_CB", "NONEEDED", operation)
- end
- set_cb_show_rename (act: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING])
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_showrename := act
- if cb_showrename /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "SHOWRENAME_CB", "NONEEDED", operation)
- end
- set_cb_rename (act: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER, STRING], STRING])
-
-
-
-
-
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_rename := act
- if cb_rename /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "RENAME_CB", "NONEEDED", operation)
- end
- set_cb_node_removed (act: detachable FUNCTION[TUPLE[IUP_TREE, STRING], STRING])
-
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_noderemoved := act
- if cb_noderemoved /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "NODEREMOVED_CB", "NONEEDED", operation)
- end
- set_cb_toggle_value (act: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER, INTEGER], STRING])
-
-
-
-
-
-
-
- local
- operation: INTEGER
- do
- cb_togglevalue := act
- if cb_togglevalue /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "TOGGLEVALUE_CB", "Fnii", operation)
- end
-
- is_valid_state (value: STRING): BOOLEAN
- do
- if value.is_equal("EXPANDED") or
- value.is_equal("COLLAPSED") then
- Result := True
- else
- Result := False
- end
- end
- is_valid_toggle (value: STRING): BOOLEAN
- do
- if value.is_equal("ON") or
- value.is_equal("OFF") or
- value.is_equal("NOTDEF") then
- Result := True
- else
- Result := False
- end
- end
- is_valid_mode (value: STRING): BOOLEAN
- do
- if value.is_equal("SINGLE") or
- value.is_equal("MULTIPLE") then
- Result := True
- else
- Result := False
- end
- 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_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_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_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_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_rightclick (id: INTEGER): STRING
- do
- if attached cb_rightclick as int_cb then
- Result := int_cb.item([Current, id])
- else
- Result := "IUP_DEFAULT"
- end
- end
-
- execute_selection (id, status: INTEGER): STRING
- do
- if attached cb_selection as int_cb then
- Result := int_cb.item([Current, id, status])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_multiselection (ids: POINTER; n: INTEGER): STRING
- do
- if attached cb_multiselection as int_cb then
- Result := int_cb.item([Current, ids, n])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_multiunselection (ids: POINTER; n: INTEGER): STRING
- do
- if attached cb_multiunselection as int_cb then
- Result := int_cb.item([Current, ids, n])
- else
- Result := "IUP_DEFAULT"
- end
- end
-
- execute_branchopen (id: INTEGER): STRING
- do
- if attached cb_branchopen as int_cb then
- Result := int_cb.item([Current, id])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_branchclose (id: INTEGER): STRING
- do
- if attached cb_branchclose as int_cb then
- Result := int_cb.item([Current, id])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_executeleaf (id: INTEGER): STRING
- do
- if attached cb_executeleaf as int_cb then
- Result := int_cb.item([Current, id])
- else
- Result := "IUP_DEFAULT"
- end
- end
-
- execute_showrename (id: INTEGER): STRING
- do
- if attached cb_showrename as int_cb then
- Result := int_cb.item([Current, id])
- else
- Result := "IUP_DEFAULT"
- end
- end
- execute_rename (id: INTEGER; title: STRING): STRING
- do
- if attached cb_rename as int_cb then
- Result := int_cb.item([Current, id, title])
- else
- Result := "IUP_DEFAULT"
- end
- end
-
- execute_noderemoved (userdata: POINTER): STRING
- local
- str: STRING
- do
- if userdata /= default_pointer then
- create str.make_from_c(userdata)
- else
- str := ""
- end
- if attached cb_noderemoved as int_cb then
- Result := int_cb.item([Current, str])
- else
- Result := "IUP_DEFAULT"
- end
- end
-
- execute_togglevalue (id, state: INTEGER): STRING
- do
- if attached cb_togglevalue as int_cb then
- Result := int_cb.item([Current, id, state])
- else
- Result := "IUP_DEFAULT"
- end
- end
-
- feature {NONE}
-
-
- cb_map: detachable FUNCTION[TUPLE[IUP_TREE], STRING]
- cb_unmap: detachable FUNCTION[TUPLE[IUP_TREE], STRING]
- cb_destroy: detachable FUNCTION[TUPLE[IUP_TREE], STRING]
- cb_getfocus: detachable FUNCTION[TUPLE[IUP_TREE], STRING]
- cb_killfocus: detachable FUNCTION[TUPLE[IUP_TREE], STRING]
- cb_enterwindow: detachable FUNCTION[TUPLE[IUP_TREE], STRING]
- cb_leavewindow: detachable FUNCTION[TUPLE[IUP_TREE], STRING]
- cb_k_any: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING]
- cb_help: detachable PROCEDURE[TUPLE[IUP_TREE]]
- cb_button: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER, INTEGER, INTEGER, INTEGER, STRING], STRING]
- cb_motion: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER, INTEGER, STRING], STRING]
- cb_dropfiles: detachable FUNCTION[TUPLE[IUP_TREE, STRING, INTEGER, INTEGER, INTEGER], STRING]
- cb_dragdrop: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER, INTEGER, INTEGER, INTEGER], STRING]
- cb_rightclick: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING]
- cb_selection: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER, INTEGER], STRING]
- cb_multiselection: detachable FUNCTION[TUPLE[IUP_TREE, POINTER, INTEGER], STRING]
- cb_multiunselection: detachable FUNCTION[TUPLE[IUP_TREE, POINTER, INTEGER], STRING]
- cb_branchopen: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING]
- cb_branchclose: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING]
- cb_executeleaf: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING]
- cb_showrename: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER], STRING]
- cb_rename: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER, STRING], STRING]
- cb_noderemoved: detachable FUNCTION[TUPLE[IUP_TREE, STRING], STRING]
- cb_togglevalue: detachable FUNCTION[TUPLE[IUP_TREE, INTEGER, INTEGER], STRING]
-
-
- int_tree: POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupTree();"
- end
- end
|