Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Member Functions
Xfc::Gdk::WindowAttr Class Reference

A GdkWindowAttr C++ wrapper class. More...

#include <xfc/gdk/window.hh>

Inheritance diagram for Xfc::Gdk::WindowAttr:
Xfc::StackObject

List of all members.

Public Member Functions

Constructors

Detailed Description

A GdkWindowAttr C++ wrapper class.

WindowAttr is used to specify the attributes to use for a newly-created window. It handles the the attibute mask internally; you only need to set the attributes you want and pass the WindowAttr to a Gdk::Window constructor. You can re-use the same WindowAttr be resetting one or more of the attributes.


Constructor & Destructor Documentation

Xfc::Gdk::WindowAttr::WindowAttr ( int  width,
int  height,
WindowType  type,
EventMaskField  event_mask = 0 
)

Construct a new WindowAttr object used to set the creation attributes for a new Gdk::Window.

Parameters:
widthThe width of the new window.
heightThe height of the new window.
typeThe window type to create; one of the types in the Gdk::WindowType enumeration.
event_maskThe event mask for the new window; determines which events are reported for the window.
Xfc::Gdk::WindowAttr::WindowAttr ( int  x,
int  y,
int  width,
int  height,
WindowType  type,
EventMaskField  event_mask = 0 
)

Construct a new WindowAttr object used to set the creation attributes for a new Gdk::Window.

Parameters:
xThe X coordinate for the upper-left corner of the window.
yThe Y coordinate for the upper-left corner of the window.
widthThe width of the new window.
heightThe height of the new window.
typeThe window type to create; one of the types in the Gdk::WindowType enumeration.
event_maskThe event mask for the new window; determines which events are reported for the window.
Xfc::Gdk::WindowAttr::WindowAttr ( const Rectangle allocation,
WindowType  type,
EventMaskField  event_mask = 0 
)

Construct a new WindowAttr object used to set the creation attributes for a new Gdk::Window.

Parameters:
allocationThe x, y, width and height of the new window. Call Gtk::Widget::get_allocation().
typeThe window type to create; one of the types in the Gdk::WindowType enumeration.
event_maskThe event mask for the new window; determines which events are reported for the window.

Member Function Documentation

void Xfc::Gdk::WindowAttr::set_allocation ( int  x,
int  y,
int  width,
int  height 
)

Set the positon and size of the window.

Parameters:
xThe X coordinate for the upper-left corner of the window.
yThe Y coordinate for the upper-left corner of the window.
widthThe width of the new window.
heightThe height of the new window.
void Xfc::Gdk::WindowAttr::set_allocation ( const Rectangle allocation)

Set the positon and size of the window.

Parameters:
allocationThe x, y, width and height of the new window. Call Gtk::Widget::get_allocation().
void Xfc::Gdk::WindowAttr::set_colormap ( const Colormap colormap)

Set the colormap for the window.

Parameters:
colormapA colormap.
void Xfc::Gdk::WindowAttr::set_cursor ( const Cursor cursor)

Set the cursor the window will use.

Parameters:
cursorA Cursor.

Set the events that will be reported for the window.

Parameters:
event_maskThe event mask for the new window.

Sets the GDK_INPUT_ONLY flag.

Windows are GDK_INPUT_OUTPUT by default so that they can receive events and be displayed on the screen. Only use this method in special circumstances when events need to be stolen from another window or windows. Input only windows have no visible output, so they are handy for placing over the top of a group of windows in order to grab the events (or filter the events) from those windows.

void Xfc::Gdk::WindowAttr::set_position ( int  x,
int  y 
)

Set the position of the window.

Parameters:
xThe X coordinate for the upper-left corner of the window.
yThe Y coordinate for the upper-left corner of the window.
void Xfc::Gdk::WindowAttr::set_size ( int  width,
int  height 
)

Set the size of the window.

Parameters:
widthThe width of the new window.
heightThe height of the new window.
void Xfc::Gdk::WindowAttr::set_title ( const String title)

Set the title for a toplevel window.

Parameters:
titleThe window title text.

Set the window type.

Parameters:
typeThe window type to create; one of the types in the Gdk::WindowType enumeration.
void Xfc::Gdk::WindowAttr::set_visual ( const Visual visual)

Set the Visual for the window.

Parameters:
visuala Visual.

The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC