20 #include <ubit/udefs.hpp> 21 #include <ubit/ustr.hpp> 22 #include <ubit/uelem.hpp> 23 #include <ubit/ugeom.hpp> 105 virtual void remove(
UWin&,
bool auto_delete);
110 void remove(UWin*,
bool auto_delete);
202 void makeDefaultContextCurrentIfNeeded();
204 void addHardwin(UWin*);
205 void removeHardwin(UWin*);
207 virtual unsigned long createColorPixel(
const URgba&) = 0;
209 virtual UCursorImpl* createCursorImpl(
int curtype) = 0;
210 virtual void deleteCursorImpl(UCursorImpl*) = 0;
225 virtual void realizeFontFamily(
const UFontFamily&);
229 unsigned long getBlackPixel()
const {
return black_pixel;}
230 unsigned long getWhitePixel()
const {
return white_pixel;}
233 unsigned long getRedMask()
const {
return red_mask;}
234 unsigned long getGreenMask()
const {
return green_mask;}
235 unsigned long getBlueMask()
const {
return blue_mask;}
236 int getRedShift()
const {
return red_shift;}
237 int getGreenShift()
const {
return green_shift;}
238 int getBlueShift()
const {
return blue_shift;}
239 int getRedBits()
const {
return red_bits;}
240 int getGreenBits()
const {
return green_bits;}
241 int getBlueBits()
const {
return blue_bits;}
242 static void countBits(
unsigned long mask,
int& bits,
int& shift);
249 virtual void onPaint(
UView* winview,
float x,
float y,
float w,
float h);
251 void onResizeCB(
UView* winview);
286 friend class UGlcontext;
287 friend class UGlcanvas;
296 virtual void startAppli() = 0;
297 virtual void quitAppli() = 0;
298 virtual void startLoop(
bool main_loop) = 0;
299 virtual void quitLoop(
bool main_loop) = 0;
308 int depth_size, stencil_size;
309 int screen_width, screen_height;
310 int screen_width_mm, screen_height_mm;
313 const UGlcontext *current_glcontext;
314 std::vector<UHardFont**> font_map;
315 unsigned long app_motion_time, nat_motion_time;
316 unsigned long black_pixel, white_pixel, red_mask, green_mask, blue_mask;
317 int red_shift, green_shift, blue_shift, red_bits, green_bits, blue_bits;
318 double IN_TO_PX, CM_TO_PX, MM_TO_PX, PT_TO_PX, PC_TO_PX;
320 typedef std::list<UHardwinImpl*> HardwinList;
321 HardwinList hardwin_list;
2D Dimension.
Definition: ugeom.hpp:55
text selection.
Definition: uselection.hpp:25
[Impl] Native Font.
Definition: uhardfont.hpp:35
2D Point.
Definition: ugeom.hpp:25
const UStr & getDisplayName() const
returns the name of the UDisp's X11 server (when X11 is used).
Definition: udisp.hpp:77
Length of positions (UPos), sizes (USize) and padding (UPadding)
Definition: ulength.hpp:59
Definition: uappliImpl.hpp:40
Ubit Event class.
Definition: uevent.hpp:30
virtual void copySelectionCB(void *system_event)
[X11 only] copie reellement la selection (ou plus exactement envoie son contenu a l'appli qui la dema...
Definition: udisp.hpp:263
class for drawing on widgets.
Definition: ugraph.hpp:44
virtual void pasteSelection(UMouseEvent &, UStr *paste_str, int paste_pos)
[impl] pastes the X selection into this UStr at this pos.
Definition: udisp.cpp:224
UStr * getPasteTarget(int &pos) const
[impl] returns the string (and the pos in this string) where the paste will take place.
Definition: udisp.cpp:209
Display Context.
Definition: udisp.hpp:44
bool isOpened() const
returns true if the Display was sucessufully opened.
Definition: udisp.hpp:61
USelection * getChannelSelection(int channel)
returns the text selection of a given event flow on this display.
Definition: udisp.cpp:242
[impl] Internal representation for fonts.
Definition: ufontImpl.hpp:24
static UDisp * create(const UStr &display_name)
creates and opens a new Display.
Definition: udisp.cpp:46
virtual void pasteSelectionCB(void *system_event)
[X11 only] recupere effectivement le contenu de la X selection.
Definition: udisp.hpp:269
virtual int getPointerState() const =0
returns the state of the modifier keys and pointer buttons.
virtual bool grabPointer(const UCursor *=null)=0
starts a physical grab of the native pointer.
int getID() const
returns the ID of this Display.
Definition: udisp.hpp:64
UEventFlow * getChannelFlow(int channel) const
returns the Event Flow for this channel on this display (null if not found).
Definition: udisp.cpp:248
The Application Context.
Definition: uappli.hpp:79
A Font Family represents a collection of fonts for all possible sizes and styles. ...
Definition: ufont.hpp:179
const UConf & getConf() const
returns the configuration of this Display.
Definition: udisp.hpp:69
Specifies a RGBA value for defining UColor(s).
Definition: ucolor.hpp:24
virtual void add(UWin &)
add a window (UFrame, UDialog, etc) to this display.
int getScreenWidth() const
returns the width of the UDisp's screen.
Definition: udisp.hpp:80
lightweight general purpose container.
Definition: uelem.hpp:44
virtual bool pickWindow(int &x_in_win, int &y_in_win, UHardwinImpl *window, UCursor *cursor=null, UCall *callback=null)=0
grabs the pointer and lets the user pick a window interactively with the mouse.
base class of callback objects for firing functions or methods.
Definition: ucall.hpp:144
virtual void ungrabPointer()=0
ends a physical grab of the native pointer.
virtual bool setSelectionOwner(UMouseEvent &)
[X11 only] tells the X-server the appli owns the X selection.
Definition: udisp.hpp:253
virtual void pasteSelectionRequest(UMouseEvent &)
[X11 only] asks the X selection.
Definition: udisp.hpp:256
virtual UPoint getPointerPos() const =0
returns the position of the pointer on the screen.
Definition: udisp.hpp:335
Event Flow.
Definition: ueventflow.hpp:34
Box View.
Definition: uview.hpp:65
Font of a UElem or UBox container.
Definition: ufont.hpp:30
configuration of the UAppli.
Definition: uconf.hpp:68
virtual UHardFont * getFont(const UFontDesc *)
returns (possibily creating) the requested font (see NOTES).
Definition: udisp.cpp:281
Definition: uhardfont.hpp:31
void clearPasteTarget()
[impl] clears the paste target.
Definition: udisp.cpp:214
Definition: urendercontext.hpp:22
Definition: uwinImpl.hpp:84
Definition: ufontmetrics.hpp:21
Base class for windows and menus.
Definition: uwin.hpp:47
const UStr & getCopyBuffer() const
returns the copy buffer.
Definition: udisp.hpp:177
Mouse cursor property.
Definition: ucursor.hpp:31
void setPixelPerInch(double pixel_per_inch)
changes the pixel density (number of pixels per inch).
Definition: udisp.cpp:201
UEventFlow * obtainFlow(unsigned int ev_state, int channel)
returns the corresponding Event Flow (creates it if does not already exist).
Definition: udisp.cpp:419
UEventFlow * obtainChannelFlow(int channel)
gets or creates the Event Flow that corresponds to this channel on this display.
Definition: udisp.cpp:257
virtual void setPointerPos(const UPoint &screen_pos)=0
move the pointer to this position on the screen.
int getBpp() const
returns the number of bit per pixel of this UDisp.
Definition: udisp.hpp:72
void setPixelPerMM(double pixel_per_mm)
changes the pixel density (number of pixels per mm).
Definition: udisp.cpp:193
Ubit String.
Definition: ustr.hpp:72
virtual void copySelection(UMouseEvent &, USelection &)
[impl] copies the content of the selection in the copy buffer and tells the X server we own the X sel...
Definition: udisp.cpp:219
mouse events
Definition: uevent.hpp:172
int getScreenHeight() const
returns the height of the UDisp's screen.
Definition: udisp.hpp:83