53 Window(
GX::Display & ,
int dx ,
int dy ,
int background ,
const std::string & title = std::string() ) ;
75 virtual ::Drawable
xd() ;
81 static long events(
bool with_mouse_moves ) ;
98 virtual void onKeyPress( ::XKeyEvent & )
override ;
102 virtual void onKey(
const std::string &
key ) ;
106 virtual void onChar(
char c ) ;
113 std::string
key()
const ;
124 void operator=(
const Window & ) ;
125 void create(
GX::Display & ,
int ,
int ,
unsigned long , const ::XSetWindowAttributes & ) ;
126 static std::string keysymToString( ::KeySym ,
bool ) ;
A window class that is-a GX::Drawable and a GX::EventHandler.
void invalidate()
Invalidates the window by posting an expose event (see GX::EventHandler::onExpose()).
void install(GX::ColourMap &)
Installs a colourmap.
virtual ::Drawable xd()
From Drawable.
GX::Capture * capture()
Starts capturing the mouse.
int dx() const
Returns the current width.
virtual void onChar(char c)
Called from this class's override of EventHandler::onKeyPress() in the case of simple character keys...
A colourmap class that provides pixel values for a set of mapped colours.
void clear()
Clears the window.
An interface for delivering GX::EventLoop events, with do-nothing default method implementations.
GX::Display & windowDisplay()
Returns a reference to the display as passed in to the ctor.
Window(GX::Display &, int dx, int dy)
Constructor. The display reference is kept.
::Window x()
Returns the X object.
virtual void onKeyPress(::XKeyEvent &) override
An override from EventHandler that calls onKey() doing the translation from opaque keycode to meaning...
int dy() const
Returns the current hieght.
std::string key() const
Returns the last onKey() string.
virtual void onKey(const std::string &key)
Called from this class's override of EventHandler::onKeyPress().
void enableEvents(long mask)
Enables the specified event types.
virtual ~Window()
Destructor.
void show()
Shows ("maps") the window.
RAII class to capture Xlib mouse events.
static long events(bool with_mouse_moves)
Returns a default event mask for enableEvents().
void sendUserEvent()
Posts a message back to itself so that onUser() gets called.
An abstract base class for xserver-side drawables (windows, pixmaps, etc) with methods for drawing po...