class RBT::GUI::UniversalWidgets::UrlAction
Constants
- HEIGHT
#¶ ↑
HEIGHT
¶ ↑#¶ ↑
- LARGER_FONT
#¶ ↑
LARGER_FONT
¶ ↑#¶ ↑
- SMALLER_FONT
#¶ ↑
SMALLER_FONT
¶ ↑#¶ ↑
- TITLE
#¶ ↑
TITLE
¶ ↑#¶ ↑
- USE_THESE_CSS_RULES
#¶ ↑
USE_THESE_CSS_RULES
¶ ↑#¶ ↑
- USE_THIS_FONT
#¶ ↑
USE_THIS_FONT
¶ ↑#¶ ↑
- WIDTH
#¶ ↑
WIDTH
¶ ↑#¶ ↑
Public Class Methods
[](i = ARGV)
click to toggle source
new( commandline_arguments = ARGV, run_already = true )
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
Calls superclass method
RBT::LeanPrototype::new
# File lib/rbt/gui/universal_widgets/url_action/url_action.rb, line 68 def initialize( commandline_arguments = ARGV, run_already = true ) super(:vertical) if use_gtk3? determine_the_GUI_to_be_used(commandline_arguments) # This must come first, even before reset(). reset set_commandline_arguments( commandline_arguments ) on_delete_event_quit_the_application run if run_already end
run( i = ARGV )
click to toggle source
#¶ ↑
RBT::GUI::Gtk::UrlAction.run¶ ↑
#¶ ↑
# File lib/rbt/gui/universal_widgets/url_action/url_action.rb, line 287 def self.run( i = ARGV ) require 'gtk_paradise/run' _ = ::RBT::GUI::Gtk::UrlAction.new(i) r = ::Gtk.run _.set_parent_widget(r) # Must come before we enable the key-combinations. r << _ r.add_shortcut(1, 'focus_on_entry', :alt) r.add_shortcut(:a, 'focus_on_entry', :alt) r.automatic_size_then_automatic_title r.enable_quick_exit r.set_background :white r.top_left_then_run end
Public Instance Methods
border_size?()
click to toggle source
connect_the_skeleton()
click to toggle source
#¶ ↑
connect_the_skeleton
(connect tag)¶ ↑
#¶ ↑
# File lib/rbt/gui/universal_widgets/url_action/url_action.rb, line 245 def connect_the_skeleton abort_on_exception outer_vbox = create_vbox # A new vbox. outer_vbox.maximal(@entry, 4) mini_hbox = create_hbox mini_hbox.minimal(@button) outer_vbox.minimal(mini_hbox, 4) outer_vbox.add(@source_view) window = create_window_or_runner window << outer_vbox properly_prepare_this_window(window, { title: title?, font: font?, width: width?, height: height?, padding: padding?, border_size: border_size? } ) window.show_all window.top_left do_all_startup_related_actions run_main end
create_scrolled_windows()
click to toggle source
create_the_entries()
click to toggle source
#¶ ↑
create_the_entries
¶ ↑
#¶ ↑
# File lib/rbt/gui/universal_widgets/url_action/url_action.rb, line 155 def create_the_entries # ========================================================================== # # === @entry # ========================================================================== # @entry = create_entry @entry.set_max_length 50 # @entry.set_activates_default(true) @entry.signal_connect(:key_press_event) { |widget, event| key_pressed = Gdk::Keyval.to_name(event.keyval) case key_pressed when 'Return','KP_Enter' @entry.set_focus true @button.signal_emit :clicked else # debug info # pp key_pressed end } end
create_the_skeleton()
click to toggle source
favicon?()
click to toggle source
handle_CSS_rules()
click to toggle source
padding?()
click to toggle source
reset()
click to toggle source
#¶ ↑
reset (reset tag)¶ ↑
#¶ ↑
Calls superclass method
RBT::LeanPrototype#reset
# File lib/rbt/gui/universal_widgets/url_action/url_action.rb, line 85 def reset super() if respond_to?(:super) reset_the_shared_module # This can come early. reset_the_base_module reset_the_internal_variables infer_the_namespace # ======================================================================= # # === @configuration # ======================================================================= # @configuration = [true, __dir__, namespace?] # ======================================================================= # # === Set the title, width, height and the font in use. # ======================================================================= # title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT) if use_gtk3? handle_CSS_rules end infer_the_size_automatically # ======================================================================= # # === @url_action # ======================================================================= # @url_action = ::RBT::UrlAction.new('', :do_not_run_yet) end
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/gui/universal_widgets/url_action/url_action.rb, line 238 def run run_super end
Also aliased as: start_gui_application
send_message_to_url_action( this_action = 'query/wget' )
click to toggle source
send_message_to_url_action_from_the_main_entry()
click to toggle source
set_buffer_text(i)
click to toggle source
smaller_font?()
click to toggle source