Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

wftk::RootWindow Class Reference

singleton class, handles access to the entire drawing surface of the application More...

#include <rootwindow.h>

Inheritance diagram for wftk::RootWindow:

wftk::SingleContainer wftk::Widget wftk::ScreenArea List of all members.

Public Member Functions

 RootWindow (int resX, int resY, int bpp=0, bool fullscreen=false, bool resizeable=true, const Surface &icon=Surface(), Uint32 extra_flags=0, unsigned padding=10)
 Constructor.

void sync ()
 immediate display content update

void setTitle (const std::string &title, const std::string &icon_name="")
 Set title, as displayed by window manager.

ScreenSurfacescreen ()
 Return a surface representing the entire root window.

bool fullscreen () const
 return fullscreen state

bool isIconified ()
 true if application is minimized / iconified

void resize (Uint16 w, Uint16 h)
 resize the screen

void resize ()
 resize the screen to fit the widgets

void updateMouse ()
 to be called by Mouse

void convertSurface ()
 for openGL only

void addSurface (Surface *)

Static Public Member Functions

RootWindowinstance ()
 return a pointer to the singleton RootWindow

int modeAvailable (int resX, int resY, int bpp, bool fullscreen)
 Check if this video mode is possible.

bool handleEvent (const SDL_Event *)
 This is static for when we have multiple root windows.


Public Attributes

SigC::Signal0< void > iconified
 application minimized / iconified

SigC::Signal0< void > restored
 application restored (uniconified)

SigC::Signal2< void, int,
int > 
resized
 application window has been resized


Protected Member Functions

virtual void drawAfter (Surface &target, const Point &offset, const Region &r)
 The area drawn to must lie within the given region.

virtual void packingUpdateParent ()
 In RootWindow, instead of telling its (nonexistent) parent we need to update the packing information, we actually do the repacking.


Detailed Description

singleton class, handles access to the entire drawing surface of the application


Member Function Documentation

void wftk::RootWindow::drawAfter Surface target,
const Point offset,
const Region r
[protected, virtual]
 

The area drawn to must lie within the given region.

This is protected so derived classes can call their parents' drawAfter() in their own implementations.

Reimplemented from wftk::Widget.

int wftk::RootWindow::modeAvailable int  resX,
int  resY,
int  bpp,
bool  fullscreen
[static]
 

Check if this video mode is possible.

If SDL will emulate the requested pixeldepth, true_bpp (if != NULL) will contain the bitdepth of the actually used video mode. This is static so you can call it before the root window is created. Returns the value for bpp that will actually be used, or 0 on failure.

virtual void wftk::RootWindow::packingUpdateParent  )  [inline, protected, virtual]
 

In RootWindow, instead of telling its (nonexistent) parent we need to update the packing information, we actually do the repacking.

We don't resize the window, letting the user control that.

Reimplemented from wftk::ScreenArea.


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

Generated Thu Mar 18 20:06:05 2004.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.