Logo Search packages:      
Sourcecode: fbpager version File versions  Download package

FbTk::FbWindow Class Reference

#include <FbWindow.hh>

Inheritance diagram for FbTk::FbWindow:

FbTk::FbDrawable

List of all members.


Detailed Description

Wrapper for X window.

Example: FbWindow window(0, 10, 10, 100, 100, ExposeMask | ButtonPressMask);
this will create a window on screen 0, position 10 10, size 100 100
and with eventmask Expose and ButtonPress.
You need to register it to some eventhandler so you can catch events:
EventManager::instance()->add(your_eventhandler, window);

See also:
EventHandler

EventManager

Definition at line 49 of file FbWindow.hh.


Public Member Functions

unsigned char alpha () const
unsigned int borderWidth () const
void changeProperty (Atom property, Atom type, int format, int mode, unsigned char *data, int nelements)
virtual void clear ()
 clear window with background pixmap or color
virtual void clearArea (int x, int y, unsigned int width, unsigned int height, bool exposures=false)
virtual void copyArea (Drawable src, GC gc, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)
int depth () const
Drawable drawable () const
virtual void drawLine (GC gc, int start_x, int start_y, int end_x, int end_y)
virtual void drawPoint (GC gc, int x, int y)
virtual void drawRectangle (GC gc, int x, int y, unsigned int width, unsigned int height)
long eventMask () const
 FbWindow (const FbWindow &parent, int x, int y, unsigned int width, unsigned int height, long eventmask, bool overrride_redirect=false, int depth=CopyFromParent, int class_type=InputOutput)
 FbWindow (int screen_num, int x, int y, unsigned int width, unsigned int height, long eventmask, bool overrride_redirect=false, int depth=CopyFromParent, int class_type=InputOutput)
 FbWindow (const FbWindow &win_copy)
virtual void fillPolygon (GC gc, XPoint *points, int npoints, int shape, int mode)
virtual void fillRectangle (GC gc, int x, int y, unsigned int width, unsigned int height)
unsigned int height () const
virtual void hide ()
virtual XImage * image (int x, int y, unsigned int width, unsigned int height) const
virtual void lower ()
virtual void move (int x, int y)
virtual void moveResize (int x, int y, unsigned int width, unsigned int height)
bool operator!= (const FbWindow &win) const
bool operator!= (Window win) const
virtual FbWindowoperator= (Window win)
 assign a new X window to this
virtual FbWindowoperator= (const FbWindow &win)
bool operator== (const FbWindow &win) const
 compare two windows
bool operator== (Window win) const
 compare X window
const FbWindowparent () const
bool property (Atom property, long long_offset, long long_length, bool do_delete, Atom req_type, Atom *actual_type_return, int *actual_format_return, unsigned long *nitems_return, unsigned long *bytes_after_return, unsigned char **prop_return) const
virtual void raise ()
void reparent (const FbWindow &parent, int x, int y)
virtual void resize (unsigned int width, unsigned int height)
int screenNumber () const
void sendEvent (bool propagate, long eventmask, XEvent &event) const
void setAlpha (unsigned char alpha)
virtual void setBackgroundColor (const FbTk::Color &bg_color)
virtual void setBackgroundPixmap (Pixmap bg_pixmap)
virtual void setBorderColor (const FbTk::Color &border_color)
virtual void setBorderWidth (unsigned int size)
void setCursor (Cursor cur)
 defines a cursor for this window
void setEventMask (long mask)
void setInputFocus (int revert_to, int time)
void setName (const char *name)
 set window name ("title")
virtual void show ()
virtual void showSubwindows ()
void translateCoordinates (const FbWindow &dest, int x, int y, int &ret_x, int &ret_y, Window &child_return) const
void unsetCursor ()
 uses the parents cursor instead
void updateGeometry (int x, int y, unsigned int width, unsigned int height)
void updateGeometry ()
 updates x,y, width, height and screen num from X window
void updateTransparent (int x=-1, int y=-1, unsigned int width=0, unsigned int height=0)
unsigned int width () const
Window window () const
int x () const
int y () const

Protected Member Functions

 FbWindow (Window client)
 creates a window with x window client (m_window = client)
void setBufferPixmap (Pixmap pm)

Private Member Functions

void create (Window parent, int x, int y, unsigned int width, unsigned int height, long eventmask, bool override_redirect, int depth, int class_type)
 creates a new X window
void setNew (Window win)
 sets new X window and destroys old

Private Attributes

unsigned int m_border_width
 border size
Pixmap m_buffer_pm
int m_depth
 bit depth
bool m_destroy
 wheter the x window was created before
unsigned int m_height
 size of window
const FbWindowm_parent
 parent FbWindow
int m_screen_num
 screen num on which this window exist
std::auto_ptr< FbTk::Transparentm_transparent
unsigned int m_width
Window m_window
 the X window
int m_x
int m_y
 position of window

Static Private Attributes

static Display * s_display = 0
 display connection

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

Generated by  Doxygen 1.6.0   Back to index