LibreOffice Module vcl (master) 1
salwtype.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_VCL_INC_SALWTYPE_HXX
21#define INCLUDED_VCL_INC_SALWTYPE_HXX
22
23#include <i18nlangtag/lang.h>
24#include <rtl/ref.hxx>
25#include <rtl/ustring.hxx>
26#include <tools/solar.h>
27#include <tools/long.hxx>
31
33class SalGraphics;
34class SalFrame;
35class SalObject;
36namespace vcl
37{
38 class Window;
39 enum class WindowState;
40}
41enum class InputContextFlags;
42enum class WindowStateMask;
43enum class ExtTextInputAttr;
44enum class ModKeyFlags;
45
46enum class SalEvent {
47 NONE,
53 KeyUp,
55 Paint,
56 Resize,
59 Close,
72 Move,
98};
99
101{
102 sal_uInt64 mnTime; // Time in ms, when event is created
103 tools::Long mnX; // X-Position (Pixel, TopLeft-Output)
104 tools::Long mnY; // Y-Position (Pixel, TopLeft-Output)
105 sal_uInt16 mnCode; // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2|MOUSE_LEFT|MOUSE_MIDDLE|MOUSE_RIGHT)
106
107protected:
109};
110
111// MOUSELEAVE must send, when the pointer leave the client area and
112// the mouse is not captured
113// MOUSEMOVE, MOUSELEAVE, MOUSEBUTTONDOWN and MOUSEBUTTONUP
114// MAC: Ctrl+Button is MOUSE_RIGHT
116{
117 sal_uInt16 mnButton; // 0-MouseMove/MouseLeave, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE
118
120};
121
122// KEYINPUT and KEYUP
124{
125 sal_uInt16 mnCode; // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2)
126 sal_uInt16 mnCharCode; // SV-CharCode
127 sal_uInt16 mnRepeat; // Repeat-Count (KeyInputs-1)
128};
129
130// MENUEVENT
132{
133 sal_uInt16 mnId; // Menu item ID
134 void* mpMenu; // pointer to VCL menu (class Menu)
135
136 SalMenuEvent() : mnId( 0 ), mpMenu( nullptr ) {}
137 SalMenuEvent( sal_uInt16 i_nId, void* i_pMenu )
138 : mnId( i_nId ), mpMenu( i_pMenu ) {}
139};
140
141// KEYMODCHANGE
143{
144 bool mbDown; // Whether the change occurred on a key down event
145 sal_uInt16 mnCode; // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2)
146 ModKeyFlags mnModKeyCode; // extended Modifier (MODKEY_LEFT,MODKEY_RIGHT,MODKEY_PRESS,MODKEY_RELEASE)
147};
148
150{
151 tools::Long mnBoundX; // BoundRect - X
152 tools::Long mnBoundY; // BoundRect - Y
153 tools::Long mnBoundWidth; // BoundRect - Width
154 tools::Long mnBoundHeight; // BoundRect - Height
155 bool mbImmediateUpdate; // set to true to force an immediate update
156
157 SalPaintEvent( tools::Long x, tools::Long y, tools::Long w, tools::Long h, bool bImmediate = false ) :
158 mnBoundX( x ), mnBoundY( y ),
160 mbImmediateUpdate( bImmediate )
161 {}
162};
163
164#define SAL_WHEELMOUSE_EVENT_PAGESCROLL (sal_uLong(0xFFFFFFFF))
166{
167 tools::Long mnDelta; // Number of rotations
168 tools::Long mnNotchDelta; // Number of fixed rotations
169 double mnScrollLines; // Actual number of lines to scroll
170 bool mbHorz; // Horizontal
171 bool mbDeltaIsPixel; // delta value is a pixel value (on touch devices)
172
174 : mnDelta(0), mnNotchDelta(0), mnScrollLines(0), mbHorz(false), mbDeltaIsPixel(false)
175 {}
176};
177
179{
180 OUString maText; // Text
181 const ExtTextInputAttr* mpTextAttr; // Text-Attribute
182 sal_Int32 mnCursorPos; // Cursor-Position
183 sal_uInt8 mnCursorFlags; // EXTTEXTINPUT_CURSOR_xxx
184};
185
187{
188 tools::Long mnX; // Cursor-X-Position to upper left corner of frame
189 tools::Long mnY; // Cursor-Y-Position to upper left corner of frame
190 tools::Long mnWidth; // Cursor-Width in Pixel
191 tools::Long mnHeight; // Cursor-Height in Pixel
192 tools::Long mnExtWidth; // Width of the PreEdit area
193 bool mbVertical; // true if in vertical mode
195 : mnX(0)
196 , mnY(0)
197 , mnWidth(0)
198 , mnHeight(0)
199 , mnExtWidth(0)
200 , mbVertical(false)
201 {
202 }
203};
204
206{
207};
208
210{
211 OUString maText; // Text
212 sal_uLong mnStart; // The beginning index of selected range
213 sal_uLong mnEnd; // The end index of selected range
214};
215
217{
218 sal_uLong mnStart; // The beginning index of selected range
219 sal_uLong mnEnd; // The end index of selected range
220};
221
223{
224 sal_uLong mnCharPos; // The index of character in a composition.
225 tools::Long mnCursorBoundX; // The cursor bounds corresponding to the character specified by mnCharPos - X
226 tools::Long mnCursorBoundY; // The cursor bounds corresponding to the character specified by mnCharPos - Y
227 tools::Long mnCursorBoundWidth; // The cursor bounds corresponding to the character specified by mnCharPos - Width
228 tools::Long mnCursorBoundHeight; // The cursor bounds corresponding to the character specified by mnCharPos - Height
229 bool mbValid; // The data is valid or not.
230 bool mbVertical; // The text is vertical or not.
231};
232
233typedef bool (*SALFRAMEPROC)( vcl::Window* pInst, SalEvent nEvent, const void* pEvent );
234
235enum class SalObjEvent {
236 GetFocus = 1,
237 LoseFocus = 2,
238 ToTop = 3
239};
240
242{
245};
246
248{
253};
254
256{
259};
260
262{
265 double mfOffset;
268};
269
271{
275 double mfScaleDelta = 0;
276};
277
279{
283 double mfAngleDelta = 0;
284};
285
286typedef void (*SALTIMERPROC)();
287
288#endif // INCLUDED_VCL_INC_SALWTYPE_HXX
289
290/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
GestureEventPanType
PanningOrientation
GestureEventRotateType
GestureEventZoomType
A SalFrame is a system window (e.g. an X11 window).
Definition: salframe.hxx:115
ExtTextInputAttr
float y
float x
InputContextFlags
Definition: inputctx.hxx:30
ModKeyFlags
Definition: keycodes.hxx:166
NONE
long Long
WindowState
Definition: windowstate.hxx:28
sal_Int32 h
sal_Int32 w
SalObjEvent
Definition: salwtype.hxx:235
bool(* SALFRAMEPROC)(vcl::Window *pInst, SalEvent nEvent, const void *pEvent)
Definition: salwtype.hxx:233
void(* SALTIMERPROC)()
Definition: salwtype.hxx:286
SalEvent
Definition: salwtype.hxx:46
@ EndExtTextInput
@ InputContextChange
@ InputLanguageChange
@ DeleteSurroundingTextRequest
@ ExtTextInputPos
@ ExternalGesture
@ ExternalKeyInput
@ GestureLongPress
@ SurroundingTextSelectionChange
@ MouseButtonDown
@ ExternalMouseButtonDown
@ StartReconversion
@ DisplayChanged
@ MenuDeactivate
@ MenuButtonCommand
@ QueryCharPosition
@ PrinterChanged
@ SurroundingTextRequest
@ ExternalMouseMove
@ ExternalMouseButtonUp
@ SettingsChanged
sal_uIntPtr sal_uLong
sal_uInt8 mnCursorFlags
Definition: salwtype.hxx:183
sal_Int32 mnCursorPos
Definition: salwtype.hxx:182
const ExtTextInputAttr * mpTextAttr
Definition: salwtype.hxx:181
tools::Long mnExtWidth
Definition: salwtype.hxx:192
PanningOrientation meOrientation
Definition: salwtype.hxx:264
GestureEventPanType meEventType
Definition: salwtype.hxx:263
tools::Long mnY
Definition: salwtype.hxx:267
tools::Long mnX
Definition: salwtype.hxx:266
GestureEventRotateType meEventType
Definition: salwtype.hxx:280
tools::Long mnY
Definition: salwtype.hxx:274
tools::Long mnX
Definition: salwtype.hxx:273
GestureEventZoomType meEventType
Definition: salwtype.hxx:272
rtl::Reference< LogicalFontInstance > mpFont
Definition: salwtype.hxx:243
InputContextFlags mnOptions
Definition: salwtype.hxx:244
sal_uInt16 mnRepeat
Definition: salwtype.hxx:127
sal_uInt16 mnCode
Definition: salwtype.hxx:125
sal_uInt16 mnCharCode
Definition: salwtype.hxx:126
ModKeyFlags mnModKeyCode
Definition: salwtype.hxx:146
sal_uInt16 mnCode
Definition: salwtype.hxx:145
sal_uInt16 mnId
Definition: salwtype.hxx:133
void * mpMenu
Definition: salwtype.hxx:134
SalMenuEvent(sal_uInt16 i_nId, void *i_pMenu)
Definition: salwtype.hxx:137
sal_uInt16 mnButton
Definition: salwtype.hxx:117
tools::Long mnBoundWidth
Definition: salwtype.hxx:153
SalPaintEvent(tools::Long x, tools::Long y, tools::Long w, tools::Long h, bool bImmediate=false)
Definition: salwtype.hxx:157
bool mbImmediateUpdate
Definition: salwtype.hxx:155
tools::Long mnBoundY
Definition: salwtype.hxx:152
tools::Long mnBoundX
Definition: salwtype.hxx:151
tools::Long mnBoundHeight
Definition: salwtype.hxx:154
tools::Long mnCursorBoundHeight
Definition: salwtype.hxx:228
tools::Long mnCursorBoundWidth
Definition: salwtype.hxx:227
tools::Long mnCursorBoundX
Definition: salwtype.hxx:225
tools::Long mnCursorBoundY
Definition: salwtype.hxx:226
tools::Long mnDelta
Definition: salwtype.hxx:167
tools::Long mnNotchDelta
Definition: salwtype.hxx:168
unsigned char sal_uInt8