Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gdk::WindowAttr Class Reference

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

`#include <inti/gdk/window.h>`

List of all members.

## Public Member Functions

Constructors

- 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.
- 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.
- 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.

Methods

- GdkWindowAttr * gdk_window_attr () const
    Get a pointer to the GdkWindowAttr structure.
- int mask () const
    Returns the bit flags that indicate which attributes are currently set.
- void set_title (const String &title)
    Set the title for a toplevel window.
- void set_type (WindowType type)
    Set the window type.
- void set_events (EventMaskField event_mask)
    Set the events that will be reported for the window.
- void set_position (int x, int y)
    Set the position of the window.
- void set_size (int width, int height)
    Set the size of the window.
- void set_allocation (int x, int y, int width, int height)
    Set the positon and size of the window.
- void set_allocation (const Rectangle &allocation)
    Set the positon and size of the window.
- void set_cursor (const Cursor &cursor)
    Set the cursor the window will use.
- void set_visual (const Visual &visual)
    Set the Visual for the window.
- void set_colormap (const Colormap &colormap)
    Set the colormap for the window.
- void set_input_only ()
    Sets the GDK_INPUT_ONLY flag.
- void set_override_redirect ()
    Sets the override_redirect flag to true so that the window bypasses the window manager.

## 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

Inti::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:

  width | The width of the new window.
  height | The height of the new window.
  type | The window type to create; one of the types in the Gdk::WindowType enumeration.
  event_mask | The event mask for the new window; determines which events are reported for the window.

Inti::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:

  x | The X coordinate for the upper-left corner of the window.
  y | The Y coordinate for the upper-left corner of the window.
  width | The width of the new window.
  height | The height of the new window.
  type | The window type to create; one of the types in the Gdk::WindowType enumeration.
  event_mask | The event mask for the new window; determines which events are reported for the window.

Inti::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:

  allocation | The x, y, width and height of the new window; call Gtk::Widget::get_allocation().
  type | The window type to create; one of the types in the Gdk::WindowType enumeration.
  event_mask | The event mask for the new window; determines which events are reported for the window.

## Member Function Documentation

void Inti::Gdk::WindowAttr::set_allocation | ( | const Rectangle & | allocation | ) |

Set the positon and size of the window.

Parameters:

  allocation | The x, y, width and height of the new window; call Gtk::Widget::get_allocation().

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

Set the positon and size of the window.

Parameters:

  x | The X coordinate for the upper-left corner of the window.
  y | The Y coordinate for the upper-left corner of the window.
  width | The width of the new window.
  height | The height of the new window.

void Inti::Gdk::WindowAttr::set_colormap | ( | const Colormap & | colormap | ) |

Set the colormap for the window.

Parameters:

  colormap | A colormap.

void Inti::Gdk::WindowAttr::set_cursor | ( | const Cursor & | cursor | ) |

Set the cursor the window will use.

Parameters:

  cursor | A Cursor.

void Inti::Gdk::WindowAttr::set_events | ( | EventMaskField | event_mask | ) |

Set the events that will be reported for the window.

Parameters:

  event_mask | The event mask for the new window.

void Inti::Gdk::WindowAttr::set_input_only | ( |  | ) |

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 Inti::Gdk::WindowAttr::set_position | ( | int | x,
|  | int | y
| ) |

Set the position of the window.

Parameters:

  x | The X coordinate for the upper-left corner of the window.
  y | The Y coordinate for the upper-left corner of the window.

void Inti::Gdk::WindowAttr::set_size | ( | int | width,
|  | int | height
| ) |

Set the size of the window.

Parameters:

  width | The width of the new window.
  height | The height of the new window.

void Inti::Gdk::WindowAttr::set_title | ( | const String & | title | ) |

Set the title for a toplevel window.

Parameters:

  title | The window title text.

void Inti::Gdk::WindowAttr::set_type | ( | WindowType | type | ) |

Set the window type.

Parameters:

  type | The window type to create; one of the types in the Gdk::WindowType enumeration.

void Inti::Gdk::WindowAttr::set_visual | ( | const Visual & | visual | ) |

Set the Visual for the window.

Parameters:

  visual | a Visual.

The documentation for this class was generated from the following file:

- gdk/window.h

Main Page - Footer