30 #ifndef Pt_Forms_Application_h
31 #define Pt_Forms_Application_h
33 #include <Pt/Forms/Api.h>
34 #include <Pt/Forms/Screen.h>
35 #include <Pt/Forms/Style.h>
36 #include <Pt/Forms/StyleOptions.h>
37 #include <Pt/Forms/GraphicsBackend.h>
38 #include <Pt/Forms/PlatinumStyle.h>
39 #include <Pt/Forms/InputMethod.h>
40 #include <Pt/Forms/Icon.h>
41 #include <Pt/Gfx/Font.h>
42 #include <Pt/Gfx/FontFace.h>
43 #include <Pt/Gfx/PngReader.h>
44 #include <Pt/System/Application.h>
45 #include <Pt/System/Path.h>
78 ApplicationImpl* impl();
86 const Screen& screen()
const;
92 void setCursor(
const Cursor* cursor = 0);
112 void setScaleFactor(
double scale);
114 double scaleFactor()
const;
116 InputMethod& inputMethod();
118 void setInputMethod(InputMethod& im);
120 void removeInputMethod(InputMethod& im);
129 void commitEvent(
const Event& ev);
131 void processEvent(
const Event& ev);
154 const std::vector<Pt::System::Path>& fontFiles()
const;
156 std::string defaultFont()
const;
158 void setDefaultFont(
const std::string& family);
160 std::vector<std::string> fontFamilies()
const;
162 std::vector<Gfx::FontFace> fontFaces(
const std::string& family)
const;
165 void onSetPointer(
Widget& widget,
bool isPointer);
167 void onRequestCapture(
Widget& target,
bool capture);
169 void onShowPopup(Popup& w,
bool transient);
171 bool isAnchoredTo(Popup& w,
Window& top)
const;
173 bool isPopupOf(Popup& w,
Window& top)
const;
178 void registerWidget(
Widget& widget);
180 void unregisterWidget(
Widget& widget);
183 void onDispatchMouseEvent(
const MouseEvent& ev);
185 void onProcessMouseEvent(
const MouseEvent& ev);
188 void onDispatchTouchEvent(
const TouchEvent& ev);
190 void onProcessTouchEvent(
const TouchEvent& ev);
194 bool isPress,
bool isPressed);
197 void onDispatchScrollEvent(
const ScrollEvent& ev);
199 void onProcessScrollEvent(
const ScrollEvent& ev);
202 void onDispatchEnterEvent(
const EnterEvent& ev);
204 void onProcessEnterEvent(
const EnterEvent& ev);
207 void onDispatchLeaveEvent(
const LeaveEvent& ev);
209 void onProcessLeaveEvent(
const LeaveEvent& ev);
212 void onDispatchKeyEvent(
const KeyEvent& ev);
214 void onProcessKeyEvent(
const KeyEvent& ev);
217 void onDispatchInvalidateEvent(
const InvalidateEvent& ev);
219 void onProcessInvalidateEvent(
const InvalidateEvent& ev);
222 void onDispatchLayoutEvent(
const LayoutEvent& ev);
224 void onProcessLayoutEvent(
const LayoutEvent& ev);
227 void onDispatchRescaleEvent(
const RescaleEvent& ev);
229 void onProcessRescaleEvent(
const RescaleEvent& ev);
232 void onDispatchPaintEvent(
const PaintEvent& ev);
234 void onProcessPaintEvent(
const PaintEvent& ev);
237 void onDispatchMoveEvent(
const MoveEvent& ev);
239 void onProcessMoveEvent(
const MoveEvent& ev);
242 void onDispatchResizeEvent(
const ResizeEvent& ev);
244 void onProcessResizeEvent(
const ResizeEvent& ev);
247 void onDispatchActivateEvent(
const ActivateEvent& ev);
249 void onProcessActivateEvent(
const ActivateEvent& ev);
252 void onDispatchEnableEvent(
const EnableEvent& ev);
254 void onProcessEnableEvent(
const EnableEvent& ev);
257 void onDispatchShowEvent(
const ShowEvent& ev);
259 void onProcessShowEvent(
const ShowEvent& ev);
262 void onDispatchCloseEvent(
const CloseEvent& ev);
264 void onProcessCloseEvent(
const CloseEvent& ev);
267 void onDispatchFocusEvent(
const FocusEvent& ev);
269 void onProcessFocusEvent(
const FocusEvent& ev);
272 void onDispatchWindowStateEvent(
const WindowStateEvent& ev);
274 void onProcessWindowStateEvent(
const WindowStateEvent& ev);
277 typedef std::map<Pt::uint64_t, Widget*> WidgetMap;
279 ApplicationImpl* _impl;
289 DefaultInputMethod* _defaultInputMethod;
290 InputMethod* _inputMethod;
292 std::list<Popup*> _popups;
293 std::list<Widget*> _capture;
Core module.
Definition: Allocator.h:33
Base class for all event types.
Definition: Event.h:50
Multicast Signal to call multiple slots.
Definition: Signal.h:190
Reader for PNG images.
Definition: PngReader.h:42
Point with floating-point X and Y coordinates.
Definition: Point.h:47
Represents time spans in microsecond resolution.
Definition: Timespan.h:63
Represents a path in the file-system.
Definition: Path.h:48
Basic image.
Definition: Image.h:52
Console applications without a GUI.
Definition: Application.h:55
uint_type uint64_t
Unsigned 64-bit integer type.
Definition: Api-Types.h:62