Class: Interphase::Fixed

Inherits:
Container show all
Defined in:
lib/interphase/widgets/fixed.rb

Overview

A container in which items can be placed in a specific x/y location.

Instance Attribute Summary

Attributes inherited from Container

#children

Attributes inherited from Widget

#gtk_instance, #name, #parent

Instance Method Summary collapse

Methods inherited from Container

#method_missing, #respond_to_missing?, #show_all

Methods inherited from Widget

#destroy, #method_missing, #on, #respond_to_missing?, #show, #size

Constructor Details

#initialize(**options, &block) ⇒ Fixed

Construct a new fixed container.


9
10
11
# File 'lib/interphase/widgets/fixed.rb', line 9

def initialize(**options, &block)
  super(Gtk::Fixed.new, **options, &block)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Interphase::Container

Instance Method Details

#add(child, x_pos, y_pos, &block) ⇒ Object

Add a child widget to this Fixed at a location.

child

The new child widget.

x_pos

The x position.

y_pos

The y position.


17
18
19
20
21
# File 'lib/interphase/widgets/fixed.rb', line 17

def add(child, x_pos, y_pos, &block)
  gtk_instance.put(child.gtk_instance, x_pos, y_pos)

  super(child, false, &block)
end