Class: AGTkFrame

Inherits:
AGTkContainer show all
Defined in:
ext/ae-rad/lib/tk/al-tk.rb

Instance Attribute Summary

Attributes inherited from AGTkBaseContainer

#where_x, #where_y

Attributes inherited from AGTk

#canvas, #l_manager, #x0, #x3, #y0, #y3

Attributes inherited from AG

#ag_parent, #i_ag, #i_name, #obj, #obj_class, #persistent, #props, #props_def, #props_kinds, #renderer, #sniffer, #sons

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AGTkContainer

class_sniffer

Methods inherited from AGTkBaseContainer

#initialize

Methods inherited from AGTkLayoutManaged

#start_properties

Methods inherited from AGTk

#activate, #active_move_tab, class_renderer, class_sniffer, #contains_events, #delete, #getFileName, #has_events, #initialize, #new_object, #popup, #popup_items, #update_property

Methods inherited from AG

#activate, active, #add_require, #build_sons, class_renderer, class_sniffer, #defaults, #defaults_values, #del_require, #delete, #fill_defaults_value_from_agobj, #getControlClassName, #getFileName, #getInstanceClass, #getObjClass, #getViewClassName, #get_implementation_block, #get_implementation_code, #get_implementation_new, #get_path_i_name, #has_sons, #initialize, near_class_wrapped, near_class_wrapper, #new_id, #new_object, #passed_object, #publish, #publish_def, #publish_del, #publish_mod, publish_property, #register, #retrive_values, #select, #start_properties, #update_property

Constructor Details

This class inherits a constructor from AGTkBaseContainer

Class Method Details

.class_wrappedObject



2573
2574
2575
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 2573

def AGTkFrame.class_wrapped
  TkFrame
end

Instance Method Details

#propertiesObject



2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 2577

def properties
  super
  publish('property',TkProperties::borderwidth(@obj))
  publish('property',TkProperties::cursor(@obj))
  publish('property',TkProperties::highlightbackground(@obj))
  publish('property',TkProperties::highlightcolor(@obj))
  publish('property',TkProperties::highlightthickness(@obj))
  publish('property',TkProperties::relief(@obj))
  publish('property',TkProperties::takefocus(@obj))
  publish('property',TkProperties::class(@obj))
  publish('property',TkProperties::colormap(@obj))
  publish('property',TkProperties::padx(@obj))
  publish('property',TkProperties::pady(@obj))
  publish('property',TkProperties::container(@obj))
  publish('property',TkProperties::border(@obj))
  publish('property',TkProperties::height(@obj))
  publish('property',TkProperties::width(@obj))
  publish_mod('place','name'=>'width', 'default'=> 200)
  publish('property','name'=>'visual',
    'get'=> proc{@obj.cget('visual')},
    'set'=> proc{|r| rewind_by_property('visual',r) },
    'def'=> "",
    'kind'=>'on-create',
    'type'=> EnumType.new('','best', 'directcolor', 'grayscale','greyscale', 
      'pseudocolor', 'staticcolor', 'staticgray', 'staticgrey', 'truecolor', 'default')
  )
end

#rewind_by_property(_name, _val) ⇒ Object



2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 2605

def rewind_by_property(_name, _val)
   msg = "To modify "+_name+" must create new Toplevel: do you want to procede ?"
   if Tk.messageBox('icon' => 'warning', 'type' => 'okcancel',
     'title' => '(Arcadia) '+_name, 'message' => msg) == 'cancel'
     return
   end
   _rewind_code = @renderer.class_code(2,_name=> _val).to_s
   begin
     Tk.messageBox('message'=>_rewind_code)
     #@object_inspector.delete(self)
     #Revparsel.new(_rewind_code)
     
   rescue => exc
     _editor = $arcadia.objects('editor').open_tab(@i_name)
     _editor.text_insert('end', _rewind_code)
     raise
   end 
end