
This class represents a window which can display CImg images and handles mouse and keyboard events. More...
#include <Robots/SeaBeeIII/Sonar/CImg.h>
Public Member Functions | |
Overloaded Operators | |
| template<typename t > | |
| CImgDisplay & | operator= (const CImg< t > &img) |
| template<typename t > | |
| CImgDisplay & | operator= (const CImgList< t > &list) |
| CImgDisplay & | operator= (const CImgDisplay &disp) |
| Operator=(). | |
| operator bool () const | |
| Return true if display is not empty. | |
Instance Checking | |
| bool | is_empty () const |
| Return true is display is empty. | |
| bool | is_closed () const |
| bool | is_resized () const |
| bool | is_moved () const |
| bool | is_event () const |
| bool | is_fullscreen () const |
| bool | is_key () const |
| _cimg_iskey_def (ESC) | |
| _cimg_iskey_def (F1) | |
| _cimg_iskey_def (F2) | |
| _cimg_iskey_def (F3) | |
| _cimg_iskey_def (F4) | |
| _cimg_iskey_def (F5) | |
| _cimg_iskey_def (F6) | |
| _cimg_iskey_def (F7) | |
| _cimg_iskey_def (F8) | |
| _cimg_iskey_def (F9) | |
| _cimg_iskey_def (F10) | |
| _cimg_iskey_def (F11) | |
| _cimg_iskey_def (F12) | |
| _cimg_iskey_def (PAUSE) | |
| _cimg_iskey_def (1) | |
| _cimg_iskey_def (2) | |
| _cimg_iskey_def (3) | |
| _cimg_iskey_def (4) | |
| _cimg_iskey_def (5) | |
| _cimg_iskey_def (6) | |
| _cimg_iskey_def (7) | |
| _cimg_iskey_def (8) | |
| _cimg_iskey_def (9) | |
| _cimg_iskey_def (0) | |
| _cimg_iskey_def (BACKSPACE) | |
| _cimg_iskey_def (INSERT) | |
| _cimg_iskey_def (HOME) | |
| _cimg_iskey_def (PAGEUP) | |
| _cimg_iskey_def (TAB) | |
| _cimg_iskey_def (Q) | |
| _cimg_iskey_def (W) | |
| _cimg_iskey_def (E) | |
| _cimg_iskey_def (R) | |
| _cimg_iskey_def (T) | |
| _cimg_iskey_def (Y) | |
| _cimg_iskey_def (U) | |
| _cimg_iskey_def (I) | |
| _cimg_iskey_def (O) | |
| _cimg_iskey_def (P) | |
| _cimg_iskey_def (DELETE) | |
| _cimg_iskey_def (END) | |
| _cimg_iskey_def (PAGEDOWN) | |
| _cimg_iskey_def (CAPSLOCK) | |
| _cimg_iskey_def (A) | |
| _cimg_iskey_def (S) | |
| _cimg_iskey_def (D) | |
| _cimg_iskey_def (F) | |
| _cimg_iskey_def (G) | |
| _cimg_iskey_def (H) | |
| _cimg_iskey_def (J) | |
| _cimg_iskey_def (K) | |
| _cimg_iskey_def (L) | |
| _cimg_iskey_def (ENTER) | |
| _cimg_iskey_def (SHIFTLEFT) | |
| _cimg_iskey_def (Z) | |
| _cimg_iskey_def (X) | |
| _cimg_iskey_def (C) | |
| _cimg_iskey_def (V) | |
| _cimg_iskey_def (B) | |
| _cimg_iskey_def (N) | |
| _cimg_iskey_def (M) | |
| _cimg_iskey_def (SHIFTRIGHT) | |
| _cimg_iskey_def (ARROWUP) | |
| _cimg_iskey_def (CTRLLEFT) | |
| _cimg_iskey_def (APPLEFT) | |
| _cimg_iskey_def (ALT) | |
| _cimg_iskey_def (SPACE) | |
| _cimg_iskey_def (ALTGR) | |
| _cimg_iskey_def (APPRIGHT) | |
| _cimg_iskey_def (MENU) | |
| _cimg_iskey_def (CTRLRIGHT) | |
| _cimg_iskey_def (ARROWLEFT) | |
| _cimg_iskey_def (ARROWDOWN) | |
| _cimg_iskey_def (ARROWRIGHT) | |
| _cimg_iskey_def (PAD0) | |
| _cimg_iskey_def (PAD1) | |
| _cimg_iskey_def (PAD2) | |
| _cimg_iskey_def (PAD3) | |
| _cimg_iskey_def (PAD4) | |
| _cimg_iskey_def (PAD5) | |
| _cimg_iskey_def (PAD6) | |
| _cimg_iskey_def (PAD7) | |
| _cimg_iskey_def (PAD8) | |
| _cimg_iskey_def (PAD9) | |
| _cimg_iskey_def (PADADD) | |
| _cimg_iskey_def (PADSUB) | |
| _cimg_iskey_def (PADMUL) | |
| _cimg_iskey_def (PADDIV) | |
| bool | is_key (const unsigned int key) const |
| bool | is_key (const char *const textcode) const |
| Get keycode corresponding to given input string. | |
| bool | is_key_sequence (const unsigned int *const key_sequence, const unsigned int length, const bool remove_sequence=false) |
| Test if a key sequence has been typed. | |
Public Attributes | |
| unsigned int | _width |
| Width of the display. | |
| unsigned int | _height |
| Height of the display. | |
| volatile unsigned int | _window_width |
| Width of the underlying window. | |
| volatile unsigned int | _window_height |
| Height of the underlying window. | |
| volatile int | _window_x |
| X-pos of the display on the screen. | |
| volatile int | _window_y |
| Y-pos of the display on the screen. | |
| volatile int | _mouse_x |
| X-coordinate of the mouse pointer on the display. | |
| volatile int | _mouse_y |
| Y-coordinate of the mouse pointer on the display. | |
| unsigned int | _normalization |
| Normalization type used for the display. | |
| char * | _title |
| Display title. | |
| volatile unsigned int | _button |
| Button state of the mouse. | |
| volatile int | _wheel |
| Wheel state of the mouse. | |
| volatile unsigned int | _keys [128] |
| Key value if pressed. | |
| volatile unsigned int | _released_keys [128] |
| volatile bool | _is_closed |
| Closed state of the window. | |
| volatile bool | _is_resized |
| Resized state of the window. | |
| volatile bool | _is_moved |
| Moved state of the window. | |
| volatile bool | _is_event |
| Event state of the window. | |
| volatile bool | _is_keyESC |
| Current state of the corresponding key (exists for all referenced keys). | |
| volatile bool | _is_keyF1 |
| volatile bool | _is_keyF2 |
| volatile bool | _is_keyF3 |
| volatile bool | _is_keyF4 |
| volatile bool | _is_keyF5 |
| volatile bool | _is_keyF6 |
| volatile bool | _is_keyF7 |
| volatile bool | _is_keyF8 |
| volatile bool | _is_keyF9 |
| volatile bool | _is_keyF10 |
| volatile bool | _is_keyF11 |
| volatile bool | _is_keyF12 |
| volatile bool | _is_keyPAUSE |
| volatile bool | _is_key1 |
| volatile bool | _is_key2 |
| volatile bool | _is_key3 |
| volatile bool | _is_key4 |
| volatile bool | _is_key5 |
| volatile bool | _is_key6 |
| volatile bool | _is_key7 |
| volatile bool | _is_key8 |
| volatile bool | _is_key9 |
| volatile bool | _is_key0 |
| volatile bool | _is_keyBACKSPACE |
| volatile bool | _is_keyINSERT |
| volatile bool | _is_keyHOME |
| volatile bool | _is_keyPAGEUP |
| volatile bool | _is_keyTAB |
| volatile bool | _is_keyQ |
| volatile bool | _is_keyW |
| volatile bool | _is_keyE |
| volatile bool | _is_keyR |
| volatile bool | _is_keyT |
| volatile bool | _is_keyY |
| volatile bool | _is_keyU |
| volatile bool | _is_keyI |
| volatile bool | _is_keyO |
| volatile bool | _is_keyP |
| volatile bool | _is_keyDELETE |
| volatile bool | _is_keyEND |
| volatile bool | _is_keyPAGEDOWN |
| volatile bool | _is_keyCAPSLOCK |
| volatile bool | _is_keyA |
| volatile bool | _is_keyS |
| volatile bool | _is_keyD |
| volatile bool | _is_keyF |
| volatile bool | _is_keyG |
| volatile bool | _is_keyH |
| volatile bool | _is_keyJ |
| volatile bool | _is_keyK |
| volatile bool | _is_keyL |
| volatile bool | _is_keyENTER |
| volatile bool | _is_keySHIFTLEFT |
| volatile bool | _is_keyZ |
| volatile bool | _is_keyX |
| volatile bool | _is_keyC |
| volatile bool | _is_keyV |
| volatile bool | _is_keyB |
| volatile bool | _is_keyN |
| volatile bool | _is_keyM |
| volatile bool | _is_keySHIFTRIGHT |
| volatile bool | _is_keyARROWUP |
| volatile bool | _is_keyCTRLLEFT |
| volatile bool | _is_keyAPPLEFT |
| volatile bool | _is_keyALT |
| volatile bool | _is_keySPACE |
| volatile bool | _is_keyALTGR |
| volatile bool | _is_keyAPPRIGHT |
| volatile bool | _is_keyMENU |
| volatile bool | _is_keyCTRLRIGHT |
| volatile bool | _is_keyARROWLEFT |
| volatile bool | _is_keyARROWDOWN |
| volatile bool | _is_keyARROWRIGHT |
| volatile bool | _is_keyPAD0 |
| volatile bool | _is_keyPAD1 |
| volatile bool | _is_keyPAD2 |
| volatile bool | _is_keyPAD3 |
| volatile bool | _is_keyPAD4 |
| volatile bool | _is_keyPAD5 |
| volatile bool | _is_keyPAD6 |
| volatile bool | _is_keyPAD7 |
| volatile bool | _is_keyPAD8 |
| volatile bool | _is_keyPAD9 |
| volatile bool | _is_keyPADADD |
| volatile bool | _is_keyPADSUB |
| volatile bool | _is_keyPADMUL |
| volatile bool | _is_keyPADDIV |
| bool | _is_fullscreen |
| Fullscreen state of the display. | |
| float | _fps_fps |
| float | _min |
| float | _max |
| unsigned long | _timer |
| unsigned long | _fps_frames |
| unsigned long | _fps_timer |
Constructors / Destructor / Instance Management | |
|
| |
| ~CImgDisplay () | |
| Destructor. | |
| CImgDisplay () | |
| Create an empty display window. | |
| CImgDisplay (const unsigned int width, const unsigned int height, const char *const title=0, const unsigned int normalization=3, const bool is_fullscreen=false, const bool is_closed=false) | |
Create a display window with a specified size pwidth x height. | |
| template<typename T > | |
| CImgDisplay (const CImg< T > &img, const char *const title=0, const unsigned int normalization=3, const bool is_fullscreen=false, const bool is_closed=false) | |
| Create a display window from an image. | |
| template<typename T > | |
| CImgDisplay (const CImgList< T > &list, const char *const title=0, const unsigned int normalization=3, const bool is_fullscreen=false, const bool is_closed=false) | |
| Create a display window from an image list. | |
| CImgDisplay (const CImgDisplay &disp) | |
| Create a display window by copying another one. | |
| CImgDisplay & | assign () |
| In-place version of the destructor. | |
| CImgDisplay & | assign (const unsigned int width, const unsigned int height, const char *const title=0, const unsigned int normalization=3, const bool is_fullscreen=false, const bool is_closed=false) |
| In-place version of the constructor. | |
| template<typename T > | |
| CImgDisplay & | assign (const CImg< T > &img, const char *const title=0, const unsigned int normalization=3, const bool is_fullscreen=false, const bool is_closed=false) |
| In-place version of the constructor. | |
| template<typename T > | |
| CImgDisplay & | assign (const CImgList< T > &list, const char *const title=0, const unsigned int normalization=3, const bool is_fullscreen=false, const bool is_closed=false) |
| In-place version of the constructor. | |
| CImgDisplay & | assign (const CImgDisplay &disp) |
| In-place version of the constructor. | |
| static void | _no_display_exception () |
| static CImgDisplay & | empty () |
| Return a reference to an empty display. | |
| static unsigned int | _fitscreen (const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const int dmin=128, const int dmax=-85, const bool return_last=false) |
Instance Characteristics | |
|
| |
| int | width () const |
| Return display width. | |
| int | height () const |
| Return display height. | |
| int | mouse_x () const |
| Return X-coordinate of the mouse pointer. | |
| int | mouse_y () const |
| Return Y-coordinate of the mouse pointer. | |
| unsigned int | button () const |
| Return current or previous state of the mouse buttons. | |
| int | wheel () const |
| Return current state of the mouse wheel. | |
| unsigned int | key (const unsigned int pos=0) const |
| Return current or previous state of the keyboard. | |
| unsigned int | released_key (const unsigned int pos=0) const |
| unsigned int | normalization () const |
| Return normalization type of the display. | |
| const char * | title () const |
| Return title of the display. | |
| int | window_width () const |
| Return display window width. | |
| int | window_height () const |
| Return display window height. | |
| int | window_x () const |
| Return X-coordinate of the window. | |
| int | window_y () const |
| Return Y-coordinate of the window. | |
| float | frames_per_second () |
| Return the frame per second rate. | |
| static unsigned int | keycode (const char *const textcode) |
| Get keycode corresponding to given input string. | |
| static int | screen_width () |
| Return the width of the screen resolution. | |
| static int | screen_height () |
| Return the height of the screen resolution. | |
Display Manipulation | |
|
| |
| template<typename T > | |
| CImgDisplay & | display (const CImg< T > &img) |
| Display an image in a window. | |
| template<typename T > | |
| CImgDisplay & | display (const CImgList< T > &list, const char axis='x', const char align='p') |
| Display an image list CImgList<T> into a display window. | |
| CImgDisplay & | resize (const bool redraw=true) |
| Resize a display window in its current size. | |
| template<typename T > | |
| CImgDisplay & | resize (const CImg< T > &img, const bool redraw=true) |
| Resize a display window with the size of an image. | |
| CImgDisplay & | resize (const CImgDisplay &disp, const bool redraw=true) |
Resize a display window using the size of the given display disp. | |
| CImgDisplay & | resize (const int width, const int height, const bool redraw=true) |
| Resize window. | |
| CImgDisplay & | set_fullscreen (const bool is_fullscreen, const bool redraw=true) |
| Set fullscreen mode. | |
| CImgDisplay & | toggle_fullscreen (const bool redraw=true) |
| Toggle fullscreen mode. | |
| CImgDisplay & | show () |
| Show a closed display. | |
| CImgDisplay & | close () |
| Close a visible display. | |
| CImgDisplay & | move (const int pos_x, const int pos_y) |
| Move window. | |
| CImgDisplay & | show_mouse () |
| Show mouse pointer. | |
| CImgDisplay & | hide_mouse () |
| Hide mouse pointer. | |
| CImgDisplay & | set_mouse (const int pos_x, const int pos_y) |
| Move mouse pointer to a specific location. | |
| CImgDisplay & | set_title (const char *const format,...) |
| Set the window title. | |
| template<typename T > | |
| CImgDisplay & | render (const CImg< T > &img) |
| Render image buffer into GDI native image format. | |
| CImgDisplay & | paint () |
| Re-paint image content in window. | |
| template<typename T > | |
| const CImgDisplay & | snapshot (CImg< T > &img) const |
| Take a snapshot of the display in the specified image. | |
| CImgDisplay & | set_button () |
| Simulate a mouse button event. | |
| CImgDisplay & | set_button (const unsigned int button, const bool is_pressed=true) |
| CImgDisplay & | set_wheel () |
| Simulate a mouse wheel event, or flush wheel events. | |
| CImgDisplay & | set_wheel (const int amplitude) |
| CImgDisplay & | set_key () |
| Simulate a keyboard press/release event, or flush all key events. | |
| CImgDisplay & | set_key (const unsigned int keycode, const bool pressed=true) |
| CImgDisplay & | flush () |
| Flush all display events. | |
| CImgDisplay & | wait (const unsigned int milliseconds) |
| Synchronized waiting function. Same as cimg::wait(). | |
| CImgDisplay & | wait () |
| Wait for an event occuring on the current display. | |
| template<typename t , typename T > | |
| static void | _render_resize (const T *ptrs, const unsigned int ws, const unsigned int hs, t *ptrd, const unsigned int wd, const unsigned int hd) |
| static void | wait (CImgDisplay &disp1) |
Wait for any event occuring on the display disp1. | |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2) |
Wait for any event occuring either on the display disp1 or disp2. | |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2, CImgDisplay &disp3) |
Wait for any event occuring either on the display disp1, disp2 or disp3. | |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2, CImgDisplay &disp3, CImgDisplay &disp4) |
Wait for any event occuring either on the display disp1, disp2, disp3 or disp4. | |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2, CImgDisplay &disp3, CImgDisplay &disp4, CImgDisplay &disp5) |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4 or disp5. | |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2, CImgDisplay &disp3, CImgDisplay &disp4, CImgDisplay &disp5, CImgDisplay &disp6) |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4, ... disp6. | |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2, CImgDisplay &disp3, CImgDisplay &disp4, CImgDisplay &disp5, CImgDisplay &disp6, CImgDisplay &disp7) |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4, ... disp7. | |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2, CImgDisplay &disp3, CImgDisplay &disp4, CImgDisplay &disp5, CImgDisplay &disp6, CImgDisplay &disp7, CImgDisplay &disp8) |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4, ... disp8. | |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2, CImgDisplay &disp3, CImgDisplay &disp4, CImgDisplay &disp5, CImgDisplay &disp6, CImgDisplay &disp7, CImgDisplay &disp8, CImgDisplay &disp9) |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4, ... disp9. | |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2, CImgDisplay &disp3, CImgDisplay &disp4, CImgDisplay &disp5, CImgDisplay &disp6, CImgDisplay &disp7, CImgDisplay &disp8, CImgDisplay &disp9, CImgDisplay &disp10) |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4, ... disp10. | |
| static void | wait_all () |
| Wait for a window event in any CImg window. | |
This class represents a window which can display CImg images and handles mouse and keyboard events.
Creating a CImgDisplay instance opens a window that can be used to display a CImg<T> image of a CImgList<T> image list inside. When a display is created, associated window events (such as mouse motion, keyboard and window size changes) are handled and can be easily detected by testing specific CImgDisplay data fields. See cimg_displays for a complete tutorial on using the CImgDisplay class.
Definition at line 5511 of file CImg.h.
| cimg_library::CImgDisplay::~CImgDisplay | ( | ) | [inline] |
| cimg_library::CImgDisplay::CImgDisplay | ( | ) | [inline] |
| cimg_library::CImgDisplay::CImgDisplay | ( | const unsigned int | width, | |
| const unsigned int | height, | |||
| const char *const | title = 0, |
|||
| const unsigned int | normalization = 3, |
|||
| const bool | is_fullscreen = false, |
|||
| const bool | is_closed = false | |||
| ) | [inline] |
Create a display window with a specified size pwidth x height.
| width | Width of the display window. | |
| height | Height of the display window. | |
| title | Title of the display window. | |
| normalization | Normalization type of the display window (0=none, 1=always, 2=once). | |
| is_fullscreen | : Fullscreen mode. | |
| is_closed | : Initially visible mode. A black image will be initially displayed in the display window. |
Definition at line 5726 of file CImg.h.
References assign(), normalization(), and title().
| cimg_library::CImgDisplay::CImgDisplay | ( | const CImg< T > & | img, | |
| const char *const | title = 0, |
|||
| const unsigned int | normalization = 3, |
|||
| const bool | is_fullscreen = false, |
|||
| const bool | is_closed = false | |||
| ) | [inline, explicit] |
Create a display window from an image.
| img | : Image that will be used to create the display window. | |
| title | : Title of the display window | |
| normalization | : Normalization type of the display window. | |
| is_fullscreen | : Fullscreen mode. | |
| is_closed | : Initially visible mode. |
Definition at line 5743 of file CImg.h.
References assign(), normalization(), and title().
| cimg_library::CImgDisplay::CImgDisplay | ( | const CImgList< T > & | list, | |
| const char *const | title = 0, |
|||
| const unsigned int | normalization = 3, |
|||
| const bool | is_fullscreen = false, |
|||
| const bool | is_closed = false | |||
| ) | [inline, explicit] |
Create a display window from an image list.
| list | : The list of images to display. | |
| title | : Title of the display window | |
| normalization | : Normalization type of the display window. | |
| is_fullscreen | : Fullscreen mode. | |
| is_closed | : Initially visible mode. |
Definition at line 5760 of file CImg.h.
References assign(), normalization(), and title().
| cimg_library::CImgDisplay::CImgDisplay | ( | const CImgDisplay & | disp | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::assign | ( | const CImgDisplay & | disp | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::assign | ( | const CImgList< T > & | list, | |
| const char *const | title = 0, |
|||
| const unsigned int | normalization = 3, |
|||
| const bool | is_fullscreen = false, |
|||
| const bool | is_closed = false | |||
| ) | [inline] |
In-place version of the constructor.
Definition at line 5810 of file CImg.h.
References cimg_library::CImgList< T >::_width, assign(), normalization(), and title().
| CImgDisplay& cimg_library::CImgDisplay::assign | ( | const CImg< T > & | img, | |
| const char *const | title = 0, |
|||
| const unsigned int | normalization = 3, |
|||
| const bool | is_fullscreen = false, |
|||
| const bool | is_closed = false | |||
| ) | [inline] |
In-place version of the constructor.
Definition at line 5802 of file CImg.h.
References cimg_library::CImg< T >::_height, cimg_library::CImg< T >::_width, assign(), normalization(), and title().
| CImgDisplay& cimg_library::CImgDisplay::assign | ( | const unsigned int | width, | |
| const unsigned int | height, | |||
| const char *const | title = 0, |
|||
| const unsigned int | normalization = 3, |
|||
| const bool | is_fullscreen = false, |
|||
| const bool | is_closed = false | |||
| ) | [inline] |
In-place version of the constructor.
Definition at line 5793 of file CImg.h.
References assign(), normalization(), and title().
| CImgDisplay& cimg_library::CImgDisplay::assign | ( | ) | [inline] |
In-place version of the destructor.
Definition at line 5787 of file CImg.h.
References flush().
Referenced by assign(), CImgDisplay(), close(), display(), cimg_library::CImg< charT >::display_graph(), empty(), cimg_library::CImg< charT >::get_select_graph(), hide_mouse(), move(), operator=(), paint(), render(), resize(), set_mouse(), set_title(), show(), show_mouse(), toggle_fullscreen(), and ~CImgDisplay().
| unsigned int cimg_library::CImgDisplay::button | ( | ) | const [inline] |
Return current or previous state of the mouse buttons.
Definition at line 6079 of file CImg.h.
References _button.
Referenced by cimg_library::cimg::dialog(), and cimg_library::CImg< charT >::get_select_graph().
| CImgDisplay& cimg_library::CImgDisplay::close | ( | void | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::display | ( | const CImgList< T > & | list, | |
| const char | axis = 'x', |
|||
| const char | align = 'p' | |||
| ) | [inline] |
Display an image list CImgList<T> into a display window.
First, all images of the list are appended into a single image used for visualization, then this image is displayed in the current display window.
| list | : The list of images to display. | |
| axis | : The axis used to append the image for visualization. Can be 'x' (default),'y','z' or 'c'. | |
| align | : Defines the relative alignment of images when displaying images of different sizes. Can be 'c' (centered, which is the default), 'p' (top alignment) and 'n' (bottom aligment). |
Definition at line 6213 of file CImg.h.
References display().
| CImgDisplay& cimg_library::CImgDisplay::display | ( | const CImg< T > & | img | ) | [inline] |
Display an image in a window.
Definition at line 6198 of file CImg.h.
References assign().
Referenced by cimg_library::CImg< charT >::display(), and display().
| static CImgDisplay& cimg_library::CImgDisplay::empty | ( | ) | [inline, static] |
| CImgDisplay& cimg_library::CImgDisplay::flush | ( | void | ) | [inline] |
Flush all display events.
Definition at line 6432 of file CImg.h.
References _is_event, _is_moved, _is_resized, set_button(), set_key(), and set_wheel().
Referenced by assign(), and cimg_library::CImg< charT >::display_graph().
| float cimg_library::CImgDisplay::frames_per_second | ( | ) | [inline] |
Return the frame per second rate.
Definition at line 6175 of file CImg.h.
References cimg_library::cimg::time().
| int cimg_library::CImgDisplay::height | ( | ) | const [inline] |
Return display height.
Definition at line 6064 of file CImg.h.
References _height.
Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::display_graph(), cimg_library::CImg< charT >::get_select_graph(), cimg_library::CImg< charT >::is_sameY(), and cimg_library::CImg< charT >::resize().
| CImgDisplay& cimg_library::CImgDisplay::hide_mouse | ( | ) | [inline] |
| bool cimg_library::CImgDisplay::is_empty | ( | ) | const [inline] |
Return true is display is empty.
Definition at line 5886 of file CImg.h.
References _height, and _width.
Referenced by operator bool(), set_fullscreen(), and wait().
| bool cimg_library::CImgDisplay::is_key | ( | const char *const | textcode | ) | const [inline] |
| bool cimg_library::CImgDisplay::is_key_sequence | ( | const unsigned int *const | key_sequence, | |
| const unsigned int | length, | |||
| const bool | remove_sequence = false | |||
| ) | [inline] |
| unsigned int cimg_library::CImgDisplay::key | ( | const unsigned int | pos = 0 |
) | const [inline] |
Return current or previous state of the keyboard.
Definition at line 6089 of file CImg.h.
References _keys.
Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::display_graph(), and cimg_library::CImg< charT >::get_select_graph().
| static unsigned int cimg_library::CImgDisplay::keycode | ( | const char *const | textcode | ) | [inline, static] |
| int cimg_library::CImgDisplay::mouse_x | ( | ) | const [inline] |
Return X-coordinate of the mouse pointer.
Definition at line 6069 of file CImg.h.
References _mouse_x.
Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::display_graph(), and cimg_library::CImg< charT >::get_select_graph().
| int cimg_library::CImgDisplay::mouse_y | ( | ) | const [inline] |
Return Y-coordinate of the mouse pointer.
Definition at line 6074 of file CImg.h.
References _mouse_y.
Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::display_graph(), and cimg_library::CImg< charT >::get_select_graph().
| CImgDisplay& cimg_library::CImgDisplay::move | ( | const int | pos_x, | |
| const int | pos_y | |||
| ) | [inline] |
Move window.
Definition at line 6295 of file CImg.h.
References assign().
Referenced by cimg_library::cimg::dialog().
| unsigned int cimg_library::CImgDisplay::normalization | ( | ) | const [inline] |
Return normalization type of the display.
Definition at line 6129 of file CImg.h.
References _normalization.
Referenced by assign(), CImgDisplay(), cimg_library::CImg< charT >::display_graph(), and cimg_library::CImg< charT >::get_select_graph().
| cimg_library::CImgDisplay::operator bool | ( | ) | const [inline] |
| CImgDisplay& cimg_library::CImgDisplay::operator= | ( | const CImgDisplay & | disp | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::paint | ( | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::render | ( | const CImg< T > & | img | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::resize | ( | const int | width, | |
| const int | height, | |||
| const bool | redraw = true | |||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::resize | ( | const CImgDisplay & | disp, | |
| const bool | redraw = true | |||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::resize | ( | const CImg< T > & | img, | |
| const bool | redraw = true | |||
| ) | [inline] |
Resize a display window with the size of an image.
| img | : Input image. image.width and image.height give the new dimensions of the display window. | |
| redraw | : If true (default), the current displayed image in the display window will be bloc-interpolated to fit the new dimensions. If false, a black image will be drawn in the resized window. |
Definition at line 6229 of file CImg.h.
References cimg_library::CImg< T >::_height, cimg_library::CImg< T >::_width, and resize().
| CImgDisplay& cimg_library::CImgDisplay::resize | ( | const bool | redraw = true |
) | [inline] |
Resize a display window in its current size.
Definition at line 6218 of file CImg.h.
References _window_height, and _window_width.
Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::get_select_graph(), and resize().
| static int cimg_library::CImgDisplay::screen_height | ( | ) | [inline, static] |
Return the height of the screen resolution.
Definition at line 6167 of file CImg.h.
Referenced by cimg_library::cimg::dialog(), and cimg_library::CImg< charT >::get_select_graph().
| static int cimg_library::CImgDisplay::screen_width | ( | ) | [inline, static] |
Return the width of the screen resolution.
Definition at line 6161 of file CImg.h.
Referenced by cimg_library::cimg::dialog(), and cimg_library::CImg< charT >::get_select_graph().
| CImgDisplay& cimg_library::CImgDisplay::set_button | ( | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::set_fullscreen | ( | const bool | is_fullscreen, | |
| const bool | redraw = true | |||
| ) | [inline] |
Set fullscreen mode.
Definition at line 6272 of file CImg.h.
References _is_fullscreen, is_empty(), and toggle_fullscreen().
Referenced by cimg_library::CImg< charT >::get_select_graph().
| CImgDisplay& cimg_library::CImgDisplay::set_key | ( | ) | [inline] |
Simulate a keyboard press/release event, or flush all key events.
Definition at line 6366 of file CImg.h.
References _is_event, _is_keyESC, and _keys.
Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::display_graph(), flush(), and cimg_library::CImg< charT >::get_select_graph().
| CImgDisplay& cimg_library::CImgDisplay::set_mouse | ( | const int | pos_x, | |
| const int | pos_y | |||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::set_title | ( | const char *const | format, | |
| ... | ||||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::set_wheel | ( | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::show | ( | ) | [inline] |
Show a closed display.
Definition at line 6285 of file CImg.h.
References assign().
Referenced by cimg_library::CImg< charT >::display_graph(), and cimg_library::CImg< charT >::get_select_graph().
| CImgDisplay& cimg_library::CImgDisplay::show_mouse | ( | ) | [inline] |
| const CImgDisplay& cimg_library::CImgDisplay::snapshot | ( | CImg< T > & | img | ) | const [inline] |
Take a snapshot of the display in the specified image.
Definition at line 6332 of file CImg.h.
Referenced by cimg_library::CImg< charT >::assign(), cimg_library::CImg< charT >::CImg(), and cimg_library::CImg< charT >::operator=().
| const char* cimg_library::CImgDisplay::title | ( | ) | const [inline] |
Return title of the display.
Definition at line 6134 of file CImg.h.
References _title.
Referenced by assign(), CImgDisplay(), and cimg_library::CImgList< charT >::display().
| CImgDisplay& cimg_library::CImgDisplay::toggle_fullscreen | ( | const bool | redraw = true |
) | [inline] |
| static void cimg_library::CImgDisplay::wait | ( | CImgDisplay & | disp1, | |
| CImgDisplay & | disp2, | |||
| CImgDisplay & | disp3, | |||
| CImgDisplay & | disp4, | |||
| CImgDisplay & | disp5, | |||
| CImgDisplay & | disp6, | |||
| CImgDisplay & | disp7, | |||
| CImgDisplay & | disp8, | |||
| CImgDisplay & | disp9, | |||
| CImgDisplay & | disp10 | |||
| ) | [inline, static] |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4, ... disp10.
Definition at line 6519 of file CImg.h.
References _is_event, and wait_all().
| static void cimg_library::CImgDisplay::wait | ( | CImgDisplay & | disp1, | |
| CImgDisplay & | disp2, | |||
| CImgDisplay & | disp3, | |||
| CImgDisplay & | disp4, | |||
| CImgDisplay & | disp5, | |||
| CImgDisplay & | disp6, | |||
| CImgDisplay & | disp7, | |||
| CImgDisplay & | disp8, | |||
| CImgDisplay & | disp9 | |||
| ) | [inline, static] |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4, ... disp9.
Definition at line 6510 of file CImg.h.
References _is_event, and wait_all().
| static void cimg_library::CImgDisplay::wait | ( | CImgDisplay & | disp1, | |
| CImgDisplay & | disp2, | |||
| CImgDisplay & | disp3, | |||
| CImgDisplay & | disp4, | |||
| CImgDisplay & | disp5, | |||
| CImgDisplay & | disp6, | |||
| CImgDisplay & | disp7, | |||
| CImgDisplay & | disp8 | |||
| ) | [inline, static] |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4, ... disp8.
Definition at line 6501 of file CImg.h.
References _is_event, and wait_all().
| static void cimg_library::CImgDisplay::wait | ( | CImgDisplay & | disp1, | |
| CImgDisplay & | disp2, | |||
| CImgDisplay & | disp3, | |||
| CImgDisplay & | disp4, | |||
| CImgDisplay & | disp5, | |||
| CImgDisplay & | disp6, | |||
| CImgDisplay & | disp7 | |||
| ) | [inline, static] |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4, ... disp7.
Definition at line 6492 of file CImg.h.
References _is_event, and wait_all().
| static void cimg_library::CImgDisplay::wait | ( | CImgDisplay & | disp1, | |
| CImgDisplay & | disp2, | |||
| CImgDisplay & | disp3, | |||
| CImgDisplay & | disp4, | |||
| CImgDisplay & | disp5, | |||
| CImgDisplay & | disp6 | |||
| ) | [inline, static] |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4, ... disp6.
Definition at line 6483 of file CImg.h.
References _is_event, and wait_all().
| static void cimg_library::CImgDisplay::wait | ( | CImgDisplay & | disp1, | |
| CImgDisplay & | disp2, | |||
| CImgDisplay & | disp3, | |||
| CImgDisplay & | disp4, | |||
| CImgDisplay & | disp5 | |||
| ) | [inline, static] |
Wait for any event occuring either on the display disp1, disp2, disp3, disp4 or disp5.
Definition at line 6477 of file CImg.h.
References _is_event, and wait_all().
| static void cimg_library::CImgDisplay::wait | ( | CImgDisplay & | disp1, | |
| CImgDisplay & | disp2, | |||
| CImgDisplay & | disp3, | |||
| CImgDisplay & | disp4 | |||
| ) | [inline, static] |
Wait for any event occuring either on the display disp1, disp2, disp3 or disp4.
Definition at line 6471 of file CImg.h.
References _is_event, and wait_all().
| static void cimg_library::CImgDisplay::wait | ( | CImgDisplay & | disp1, | |
| CImgDisplay & | disp2, | |||
| CImgDisplay & | disp3 | |||
| ) | [inline, static] |
Wait for any event occuring either on the display disp1, disp2 or disp3.
Definition at line 6465 of file CImg.h.
References _is_event, and wait_all().
| static void cimg_library::CImgDisplay::wait | ( | CImgDisplay & | disp1, | |
| CImgDisplay & | disp2 | |||
| ) | [inline, static] |
Wait for any event occuring either on the display disp1 or disp2.
Definition at line 6459 of file CImg.h.
References _is_event, and wait_all().
| static void cimg_library::CImgDisplay::wait | ( | CImgDisplay & | disp1 | ) | [inline, static] |
Wait for any event occuring on the display disp1.
Definition at line 6453 of file CImg.h.
References _is_event, and wait_all().
| CImgDisplay& cimg_library::CImgDisplay::wait | ( | ) | [inline] |
Wait for an event occuring on the current display.
Definition at line 6447 of file CImg.h.
References is_empty().
| CImgDisplay& cimg_library::CImgDisplay::wait | ( | const unsigned int | milliseconds | ) | [inline] |
Synchronized waiting function. Same as cimg::wait().
Definition at line 6441 of file CImg.h.
Referenced by cimg_library::cimg::dialog(), and cimg_library::CImg< charT >::get_select_graph().
| static void cimg_library::CImgDisplay::wait_all | ( | ) | [inline, static] |
| int cimg_library::CImgDisplay::wheel | ( | ) | const [inline] |
Return current state of the mouse wheel.
Definition at line 6084 of file CImg.h.
References _wheel.
Referenced by cimg_library::CImg< charT >::display_graph(), and cimg_library::CImg< charT >::get_select_graph().
| int cimg_library::CImgDisplay::width | ( | ) | const [inline] |
Return display width.
Definition at line 6059 of file CImg.h.
References _width.
Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::display_graph(), cimg_library::CImg< charT >::get_select_graph(), cimg_library::CImg< charT >::is_sameX(), and cimg_library::CImg< charT >::resize().
| int cimg_library::CImgDisplay::window_height | ( | ) | const [inline] |
| int cimg_library::CImgDisplay::window_width | ( | ) | const [inline] |
| int cimg_library::CImgDisplay::window_x | ( | ) | const [inline] |
| int cimg_library::CImgDisplay::window_y | ( | ) | const [inline] |
| volatile unsigned int cimg_library::CImgDisplay::_button |
Button state of the mouse.
Definition at line 5544 of file CImg.h.
Referenced by button(), and set_button().
| unsigned int cimg_library::CImgDisplay::_height |
Height of the display.
Definition at line 5517 of file CImg.h.
Referenced by assign(), height(), is_empty(), resize(), and toggle_fullscreen().
| volatile bool cimg_library::CImgDisplay::_is_closed |
| volatile bool cimg_library::CImgDisplay::_is_event |
Event state of the window.
Definition at line 5563 of file CImg.h.
Referenced by flush(), set_button(), set_key(), set_wheel(), and wait().
Fullscreen state of the display.
Definition at line 5656 of file CImg.h.
Referenced by set_fullscreen().
| volatile bool cimg_library::CImgDisplay::_is_keyESC |
| volatile bool cimg_library::CImgDisplay::_is_moved |
| volatile bool cimg_library::CImgDisplay::_is_resized |
Resized state of the window.
Definition at line 5557 of file CImg.h.
Referenced by flush(), and cimg_library::CImg< charT >::get_select_graph().
| volatile unsigned int cimg_library::CImgDisplay::_keys[128] |
Key value if pressed.
Definition at line 5550 of file CImg.h.
Referenced by is_key_sequence(), key(), and set_key().
| volatile int cimg_library::CImgDisplay::_mouse_x |
| volatile int cimg_library::CImgDisplay::_mouse_y |
| unsigned int cimg_library::CImgDisplay::_normalization |
Normalization type used for the display.
Definition at line 5538 of file CImg.h.
Referenced by cimg_library::CImg< charT >::display_graph(), cimg_library::CImg< charT >::get_select_graph(), and normalization().
| volatile int cimg_library::CImgDisplay::_wheel |
Wheel state of the mouse.
Definition at line 5547 of file CImg.h.
Referenced by set_wheel(), and wheel().
| unsigned int cimg_library::CImgDisplay::_width |
Width of the display.
Definition at line 5514 of file CImg.h.
Referenced by assign(), is_empty(), resize(), toggle_fullscreen(), and width().
| volatile unsigned int cimg_library::CImgDisplay::_window_height |
Height of the underlying window.
Definition at line 5523 of file CImg.h.
Referenced by resize(), and window_height().
| volatile unsigned int cimg_library::CImgDisplay::_window_width |
Width of the underlying window.
Definition at line 5520 of file CImg.h.
Referenced by resize(), and window_width().
| volatile int cimg_library::CImgDisplay::_window_x |
X-pos of the display on the screen.
Definition at line 5526 of file CImg.h.
Referenced by window_x().
| volatile int cimg_library::CImgDisplay::_window_y |
Y-pos of the display on the screen.
Definition at line 5529 of file CImg.h.
Referenced by window_y().
1.6.3