Gnash  0.8.10
Public Member Functions
gnash::Qt4Gui Class Reference

#include <Qt4Gui.h>

Inheritance diagram for gnash::Qt4Gui:
gnash::Gui

List of all members.

Public Member Functions

 Qt4Gui (unsigned long xid, float scale, bool loop, RunResources &r)
virtual ~Qt4Gui ()
virtual bool init (int argc, char **argv[])
 / Initialise the gui and the associated renderer.
virtual bool createWindow (const char *windowtitle, int width, int height, int xPosition=0, int yPosition=0)
 Create and display our window.
virtual void resizeWindow (int width, int height)
virtual bool run ()
 Start main rendering loop.
virtual void renderBuffer ()
virtual void setInterval (unsigned int interval)
 Set main loop delay in milliseconds.
virtual void setTimeout (unsigned int timeout)
 Set the time in milliseconds after which the programme should exit.
virtual void handleKeyEvent (QKeyEvent *event, bool down)
virtual void setCursor (gnash_cursor_type newcursor)
 Sets the current mouse cursor for the Gui window.
virtual void setFullscreen ()
virtual bool showMouse (bool show)
 Sets whether the gui should show the system mouse pointer.
virtual void unsetFullscreen ()
virtual void setClipboard (const std::string &copy)
virtual std::pair< int, int > screenResolution () const
virtual double getScreenDPI () const
virtual bool yesno (const std::string &question)
 Prompt user with a question she can answer with yes/no.
void setInvalidatedRegions (const InvalidatedRanges &ranges)
void resize (int width, int height)
void showProperties ()
void showPreferences ()
void quitUI ()
 End main rendering loop calling GUI-specific exit functions.
bool want_multiple_regions ()
void renderWidget (const QRect &updateRect)
void popupMenu (const QPoint &point)

Constructor & Destructor Documentation

gnash::Qt4Gui::Qt4Gui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources r 
)
gnash::Qt4Gui::~Qt4Gui ( ) [virtual]

Member Function Documentation

bool gnash::Qt4Gui::createWindow ( const char *  title,
int  width,
int  height,
int  xPosition = 0,
int  yPosition = 0 
) [virtual]

Create and display our window.

Parameters:
titleThe window title.
widthThe desired window width in pixels.
heightThe desired window height in pixels.
xPositionThe desired window X position from the top left corner.
yPositionThe desired window Y position from the top left corner.

Implements gnash::Gui.

References gnash::Gui::_width, width, gnash::Gui::_height, height, gnash::Gui::_xid, gnash::Gui::_renderer, gnash::Gui::_validbounds, gnash::geometry::Range2d::setTo(), gnash::Gui::_runResources, and gnash::RunResources::setRenderer().

double gnash::Qt4Gui::getScreenDPI ( ) const [virtual]

Reimplemented from gnash::Gui.

References assert.

void gnash::Qt4Gui::handleKeyEvent ( QKeyEvent *  event,
bool  down 
) [virtual]
bool gnash::Qt4Gui::init ( int  argc,
char **  argv[] 
) [virtual]

/ Initialise the gui and the associated renderer.

Parameters:
argcThe commandline argument count.
argvThe commandline arguments.
Returns:
True on success; false on failure.

Implements gnash::Gui.

References gnash::key::r, gnash::key::i, gnash::EmbedWidget::drawingWidget(), gnash::Gui::_runResources, gnash::RunResources::getRenderBackend(), _, and gnash::Gui::_xid.

void gnash::Qt4Gui::popupMenu ( const QPoint &  point)
void gnash::Qt4Gui::quitUI ( ) [virtual]

End main rendering loop calling GUI-specific exit functions.

Do not call this directly. Call quit() instead. The default implementation calls exit(EXIT_SUCCESS), which isn't nice. Please implement the proper main loop quitter in the subclasses.

Reimplemented from gnash::Gui.

void gnash::Qt4Gui::renderBuffer ( ) [virtual]

Render the current buffer. For OpenGL, this means that the front and back buffers are swapped.

Implements gnash::Gui.

References gnash::key::i, gnash::key::e, and assert.

void gnash::Qt4Gui::renderWidget ( const QRect &  updateRect)
void gnash::Qt4Gui::resize ( int  width,
int  height 
)
void gnash::Qt4Gui::resizeWindow ( int  width,
int  height 
) [virtual]

Reimplemented from gnash::Gui.

References gnash::Gui::_width, width, gnash::Gui::_height, and height.

bool gnash::Qt4Gui::run ( ) [virtual]

Start main rendering loop.

Implements gnash::Gui.

std::pair< int, int > gnash::Qt4Gui::screenResolution ( ) const [virtual]

Reimplemented from gnash::Gui.

References gnash::key::d, assert, and gnash::key::c.

void gnash::Qt4Gui::setClipboard ( const std::string &  copy) [virtual]

Reimplemented from gnash::Gui.

References assert.

void gnash::Qt4Gui::setCursor ( gnash_cursor_type  newcursor) [virtual]

Sets the current mouse cursor for the Gui window.

Reimplemented from gnash::Gui.

References gnash::Gui::_mouseShown, gnash::CURSOR_HAND, and gnash::CURSOR_INPUT.

void gnash::Qt4Gui::setFullscreen ( ) [virtual]

Attempt to run in a fullscreen window both for plugin and standalone player. Use isFullscreen() to see if gnash thinks it's running in fullscreen or not. The switch to fullscreen may fail if, for instance, the window manager refuses to allow it, but the flag will be set anyway.

Reimplemented from gnash::Gui.

References gnash::Gui::_fullscreen.

Referenced by gnash::DrawingWidget::fullscreen().

void gnash::Qt4Gui::setInterval ( unsigned int  interval) [virtual]

Set main loop delay in milliseconds.

Reimplemented from gnash::Gui.

void gnash::Qt4Gui::setInvalidatedRegions ( const InvalidatedRanges ranges) [virtual]
void gnash::Qt4Gui::setTimeout ( unsigned int  timeout) [virtual]

Set the time in milliseconds after which the programme should exit.

Implements gnash::Gui.

References gnash::Gui::quit().

bool gnash::Qt4Gui::showMouse ( bool  show) [virtual]

Sets whether the gui should show the system mouse pointer.

Parameters:
showtrue if the mouse should be shown.
Returns:
true if the state changed.

Reimplemented from gnash::Gui.

References gnash::Gui::_mouseShown.

void gnash::Qt4Gui::showPreferences ( )
void gnash::Qt4Gui::showProperties ( )
void gnash::Qt4Gui::unsetFullscreen ( ) [virtual]

Return from fullscreen to normal mode.

Reimplemented from gnash::Gui.

References gnash::Gui::_fullscreen, and gnash::Gui::_xid.

Referenced by gnash::DrawingWidget::fullscreen().

bool gnash::Qt4Gui::want_multiple_regions ( ) [inline, virtual]

Reimplemented from gnash::Gui.

bool gnash::Qt4Gui::yesno ( const std::string &  question) [virtual]

Prompt user with a question she can answer with yes/no.

Parameters:
questionThe question to ask user
Returns:
true for YES, false for NO

The default implementation always returns true.

Reimplemented from gnash::Gui.


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