Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

Etk_Mdi_Area


Detailed Description

A container widget for Etk_Mdi_Window.

Etk_Mdi_Area allows you to easily position mdi_windows and/or other widgets at fixed coordinates. The children will have the same size as their requested-size (unless a mdi_window is maximized). So to force a child to have a fixed size, you can call etk_widget_size_request_set() on the child.
Fox example, to put a mdi_window at the position (20, 30), with the size 100x30:

 Etk_Widget *mdi_area;
 Etk_Widget *mdi_window;

 mdi_area = etk_mdi_area_new();
 mdi_window = etk_mdi_window_new();
 etk_mdi_area_put(ETK_MDI_AREA(mdi_area), mdi_window, 20, 30);
 etk_widget_size_request_set(mdi_window, 100, 30);

Object Hierarchy:
  • Etk_Object
    • Etk_Widget
      • Etk_Container
        • Etk_Mdi_Area


Data Structures

struct  Etk_Mdi_Area
 A container widget for Etk_Mdi_Window. More...

Defines

#define ETK_MDI_AREA_TYPE   (etk_mdi_area_type_get())
#define ETK_MDI_AREA(obj)   (ETK_OBJECT_CAST((obj), ETK_MDI_AREA_TYPE, Etk_Mdi_Area))
#define ETK_IS_MDI_AREA(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_MDI_AREA_TYPE))

Functions

Etk_Widget * etk_mdi_area_new (void)
 Creates a new mdi_area container.
void etk_mdi_area_put (Etk_Mdi_Area *mdi_area, Etk_Widget *widget, int x, int y)
 Puts a new child into the mdi_area container, at the position (x, y).
void etk_mdi_area_move (Etk_Mdi_Area *mdi_area, Etk_Widget *widget, int x, int y)
 Moves an existing child of the mdi_area container to the position (x, y).
void etk_mdi_area_child_position_get (Etk_Mdi_Area *mdi_area, Etk_Widget *widget, int *x, int *y)
 Gets the position of a child of the mdi_area container.


Define Documentation

#define ETK_MDI_AREA_TYPE   (etk_mdi_area_type_get())

Gets the type of a area

Referenced by etk_mdi_area_new().

#define ETK_MDI_AREA ( obj   )     (ETK_OBJECT_CAST((obj), ETK_MDI_AREA_TYPE, Etk_Mdi_Area))

Casts the object to an Etk_Mdi_Area

#define ETK_IS_MDI_AREA ( obj   )     (ETK_OBJECT_CHECK_TYPE((obj), ETK_MDI_AREA_TYPE))

Check if the object is an Etk_Mdi_Area


Function Documentation

Etk_Widget * etk_mdi_area_new ( void   ) 

Creates a new mdi_area container.

Returns:
Returns the new mdi_area container

References ETK_MDI_AREA_TYPE, and etk_widget_new().

void etk_mdi_area_put ( Etk_Mdi_Area *  mdi_area,
Etk_Widget *  widget,
int  x,
int  y 
)

Puts a new child into the mdi_area container, at the position (x, y).

Parameters:
mdi_area a mdi_area container
child the child to add
x the x position where to put the child
y the y position where to put the child

References children, clip, ETK_CALLBACK, ETK_IS_MDI_WINDOW, ETK_OBJECT, etk_object_data_set(), etk_object_notification_callback_add(), etk_signal_emit(), ETK_WIDGET, etk_widget_clip_set(), and etk_widget_parent_set().

void etk_mdi_area_move ( Etk_Mdi_Area *  mdi_area,
Etk_Widget *  widget,
int  x,
int  y 
)

Moves an existing child of the mdi_area container to the position (x, y).

Parameters:
mdi_area a mdi_area container
widget the child to move
x the x position where to move the child
y the y position where to move the child

References children, ETK_WIDGET, and etk_widget_size_recalc_queue().

void etk_mdi_area_child_position_get ( Etk_Mdi_Area *  mdi_area,
Etk_Widget *  widget,
int *  x,
int *  y 
)

Gets the position of a child of the mdi_area container.

Parameters:
mdi_area a mdi_area container
widget the child you want the position of
x the location where to store the x position of the child (it can be NULL)
y the location where to store the y position of the child (it can be NULL)
Note:
if the child is not contained by the mdi_area container, x and y will be set to (0, 0)

References ETK_OBJECT, and etk_object_data_get().