Gnash
0.8.10
|
#include <Qt4Gui.h>
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 ©) |
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) |
gnash::Qt4Gui::Qt4Gui | ( | unsigned long | xid, |
float | scale, | ||
bool | loop, | ||
RunResources & | r | ||
) |
gnash::Qt4Gui::~Qt4Gui | ( | ) | [virtual] |
bool gnash::Qt4Gui::createWindow | ( | const char * | title, |
int | width, | ||
int | height, | ||
int | xPosition = 0 , |
||
int | yPosition = 0 |
||
) | [virtual] |
Create and display our window.
title | The window title. |
width | The desired window width in pixels. |
height | The desired window height in pixels. |
xPosition | The desired window X position from the top left corner. |
yPosition | The 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] |
References gnash::key::c, and gnash::Gui::notify_key_event().
Referenced by gnash::DrawingWidget::keyPressEvent(), and gnash::DrawingWidget::keyReleaseEvent().
bool gnash::Qt4Gui::init | ( | int | argc, |
char ** | argv[] | ||
) | [virtual] |
/ Initialise the gui and the associated renderer.
argc | The commandline argument count. |
argv | The commandline arguments. |
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 | ) |
Referenced by gnash::DrawingWidget::contextMenuEvent().
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 | ) |
Referenced by gnash::DrawingWidget::paintEvent().
void gnash::Qt4Gui::resize | ( | int | width, |
int | height | ||
) |
References gnash::Gui::resize_view().
Referenced by gnash::DrawingWidget::resizeEvent().
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] |
Reimplemented from gnash::Gui.
References gnash::Gui::_renderer, gnash::key::i, gnash::key::e, gnash::geometry::SnappingRanges2d::size(), gnash::geometry::Intersection(), gnash::geometry::SnappingRanges2d::getRange(), gnash::Gui::_validbounds, gnash::geometry::Range2d::isNull(), assert, and gnash::geometry::Range2d::isFinite().
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.
show | true if the mouse should be shown. |
Reimplemented from gnash::Gui.
References gnash::Gui::_mouseShown.
void gnash::Qt4Gui::showPreferences | ( | ) |
Referenced by gnash::DrawingWidget::preferences().
void gnash::Qt4Gui::showProperties | ( | ) |
References _q, gnash::key::i, gnash::key::e, gnash::key::p, and gnash::key::j.
Referenced by gnash::DrawingWidget::properties().
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.
question | The question to ask user |
The default implementation always returns true.
Reimplemented from gnash::Gui.