Class: AbstractComposant

Inherits:
Object show all
Includes:
Ruiby_dsl
Defined in:
lib/ruiby_gtk/component.rb

Overview

class father of all component is ‘like’ a Window class : it delagate DSL words to @win member

Constant Summary

Constants included from Ruiby_dsl

Ruiby_dsl::GTK2ICONNAME

Instance Method Summary collapse

Methods included from Ruiby_dsl

#_, #_accept?, #_cbox, #_check_append, #_create_log_window, #_dyn_check_button, #_dyn_entry, #_dyn_fslider, #_dyn_ientry, #_dyn_islider, #_dyn_label, #_dyn_progress, #_dyn_toggle_button, #_exe_posix, #_exe_windows, #_label, #_make_prop_line, #_nocodeeeeeeeeeee, #_pack, #_paned, #_radio_buttons, #_set_accepter, #_sub_image, #aaa_generalities, #accordion, #aitem, #alabel, #append_to, #apply_options, #attribs, #autoslot, #background, #backgroundi, #bourrage, #box, #button, #button_expand, #button_icon_text, #button_left_icon_text, #buttoni, #calendar, #canvas, #canvasOld, #cell, #cell_bottom, #cell_hspan, #cell_hspan_left, #cell_hspan_right, #cell_hvspan, #cell_left, #cell_pass, #cell_right, #cell_span, #cell_top, #cell_vspan, #cell_vspan_bottom, #cell_vspan_top, #center, #check_button, #clear, #clear_append_to, #clickable, #close_dialog, #color_choice, #color_conversion, #combo, #css_name, #current_layout, cv_color_html, #def_style, #delete, #dialog, #dialog_async, #entry, #exe, #fentry, #field, #fields, #flow, #flow_paned, #flowi, #force_update, #frame, #framei, #fslider, #get_config, #get_current_container, #get_icon, #get_image, #get_image_from, #get_pixbuf, #get_pixmap, #get_stockicon_pixbuf, #grid, #haccordion, #hide_app, #hradio_buttons, html_color, #html_color, #htoolbar, #htoolbar_with_icon_text, #ientry, #image, #install_composant, #islider, #label, #label_clickable, #labeli, #left, #levelbar, #list, #log_as_widget, #menu, #menu_bar, #menu_button, #menu_checkbutton, #menu_separator, #next_row, #notebook, #on_canvas_button_motion, #on_canvas_button_press, #on_canvas_button_release, #on_canvas_draw, #on_canvas_key_press, #on_canvas_resize, #on_delete, #page, #panel, #panel_async, #panel_progress, #pclickable, #pclickablie, #plot, #popup, #popup_clear_append, #pp_item, #pp_separator, #progress, #progress_bar, #properties, #propertys, #razslot, #regular, #right, #row, #script, #scrolled, #sentence, #sentenci, #separator, #show_all_children, #show_app, #show_methods, #show_source, #slider, #slot, #slot_append_after, #slot_append_before, #sloti, #snapshot, #source_editor, #space, #spacei, #spacing, #stack, #stack_paned, #stacki, #syst_add_button, #syst_add_check, #syst_add_sepratator, #syst_icon, #syst_quit_button, #systray, #systray_setup, #table, #text_area, #text_area_dyn, #toggle_button, #toolbar_button, #toolbar_separator, #tooltip, #trace, #tree_grid, #update, #var_box, #var_boxi, #vbox_scrolled, #video, #vradio_buttons, #widget_properties, #window

Methods included from Ruiby_default_dialog

#_gooooooooooo, #_process_terminal_key, #ask_color, #ask_dir_to_read, #ask_dir_to_write, #ask_file_to_read, #ask_file_to_write, #dialog_chooser, #edit, #message, #promptSync, #terminal, #trace

Instance Method Details

#alert(*t) ⇒ Object

Delegate window dsl words



24
# File 'lib/ruiby_gtk/component.rb', line 24

def alert(*t) @win.alert(*t) end

#ask(*t) ⇒ Object



27
# File 'lib/ruiby_gtk/component.rb', line 27

def ask(*t) @win.ask(*t) end

#error(*t) ⇒ Object



25
# File 'lib/ruiby_gtk/component.rb', line 25

def error(*t) @win.alert(*t) end

#install(cur) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ruiby_gtk/component.rb', line 8

def install(cur) 
   @lcur=cur
   p @lcur.last.methods.sort.grep /win/
   @win=$app
   @ltable=[]
   @current_widget=nil
   @cur=nil
   begin
     component
   rescue Exception => e
     error("Composant error  : "+$!.to_s + " :\n     " +  $!.backtrace[0..10].join("\n     "))
   end
end

#log(*t) ⇒ Object



28
# File 'lib/ruiby_gtk/component.rb', line 28

def log(*t) @win.log(*t) end

#prompt(*t, &b) ⇒ Object



26
# File 'lib/ruiby_gtk/component.rb', line 26

def prompt(*t,&b) @win.prompt(*t) { |v| b.call(v) } end