diff options
Diffstat (limited to 'include/vcl/commandevent.hxx')
-rw-r--r-- | include/vcl/commandevent.hxx | 51 |
1 files changed, 30 insertions, 21 deletions
diff --git a/include/vcl/commandevent.hxx b/include/vcl/commandevent.hxx index bba39cc97ddd..d3ec4ffc9435 100644 --- a/include/vcl/commandevent.hxx +++ b/include/vcl/commandevent.hxx @@ -26,10 +26,6 @@ #include <vcl/keycod.hxx> #include <vcl/font.hxx> - -// - CommandExtTextInputData - - - #define EXTTEXTINPUT_ATTR_GRAYWAVELINE ((sal_uInt16)0x0100) #define EXTTEXTINPUT_ATTR_UNDERLINE ((sal_uInt16)0x0200) #define EXTTEXTINPUT_ATTR_BOLDUNDERLINE ((sal_uInt16)0x0400) @@ -42,6 +38,7 @@ #define EXTTEXTINPUT_CURSOR_INVISIBLE ((sal_uInt16)0x0001) #define EXTTEXTINPUT_CURSOR_OVERWRITE ((sal_uInt16)0x0002) + class VCL_DLLPUBLIC CommandExtTextInputData { private: @@ -70,9 +67,6 @@ public: }; -// - CommandInputContextData - - - class VCL_DLLPUBLIC CommandInputContextData { private: @@ -83,20 +77,19 @@ public: CommandInputContextData( LanguageType eLang ); }; + inline CommandInputContextData::CommandInputContextData() { meLanguage = LANGUAGE_DONTKNOW; } + inline CommandInputContextData::CommandInputContextData( LanguageType eLang ) { meLanguage = eLang; } -// - CommandWheelData - - - enum class CommandWheelMode { NONE = 0, @@ -106,6 +99,7 @@ enum class CommandWheelMode DATAZOOM = 4 }; + // Magic value used in mnLines field in CommandWheelData #define COMMAND_WHEEL_PAGESCROLL ((sal_uLong)0xFFFFFFFF) @@ -145,6 +139,7 @@ public: { return ((mnCode & KEY_MOD2) != 0); } }; + inline CommandWheelData::CommandWheelData() { mnDelta = 0; @@ -156,6 +151,7 @@ inline CommandWheelData::CommandWheelData() mbDeltaIsPixel = false; } + inline CommandWheelData::CommandWheelData( long nWheelDelta, long nWheelNotchDelta, sal_uLong nScrollLines, CommandWheelMode nWheelMode, sal_uInt16 nKeyModifier, @@ -171,9 +167,6 @@ inline CommandWheelData::CommandWheelData( long nWheelDelta, long nWheelNotchDel } -// - CommandScrollData - - - class VCL_DLLPUBLIC CommandScrollData { private: @@ -188,12 +181,14 @@ public: long GetDeltaY() const { return mnDeltaY; } }; + inline CommandScrollData::CommandScrollData() { mnDeltaX = 0; mnDeltaY = 0; } + inline CommandScrollData::CommandScrollData( long nDeltaX, long nDeltaY ) { mnDeltaX = nDeltaX; @@ -201,9 +196,6 @@ inline CommandScrollData::CommandScrollData( long nDeltaX, long nDeltaY ) } -// - CommandModKeyData - - - class VCL_DLLPUBLIC CommandModKeyData { private: @@ -219,26 +211,26 @@ public: bool IsRightShift() const { return (mnCode & MODKEY_RSHIFT) != 0; } }; + inline CommandModKeyData::CommandModKeyData() { mnCode = 0L; } + inline CommandModKeyData::CommandModKeyData( sal_uInt16 nCode ) { mnCode = nCode; } -// - CommandDialogData - - - enum class ShowDialogId { Preferences = 1, About = 2, }; + class VCL_DLLPUBLIC CommandDialogData { ShowDialogId m_nDialogId; @@ -250,6 +242,7 @@ public: ShowDialogId GetDialogId() const { return m_nDialogId; } }; + // Media Commands enum class MediaCommand { @@ -277,6 +270,7 @@ enum class MediaCommand PreviousTrackHold = 22,// Button Left holding pressed. }; + class VCL_DLLPUBLIC CommandMediaData { MediaCommand m_nMediaId; @@ -292,7 +286,7 @@ public: bool GetPassThroughToOS() const { return m_bPassThroughToOS; } }; -// - CommandSelectionChangeData - + class VCL_DLLPUBLIC CommandSelectionChangeData { private: @@ -307,11 +301,13 @@ public: sal_uLong GetEnd() const { return mnEnd; } }; + inline CommandSelectionChangeData::CommandSelectionChangeData() { mnStart = mnEnd = 0; } + inline CommandSelectionChangeData::CommandSelectionChangeData( sal_uLong nStart, sal_uLong nEnd ) { @@ -319,6 +315,7 @@ inline CommandSelectionChangeData::CommandSelectionChangeData( sal_uLong nStart, mnEnd = nEnd; } + class VCL_DLLPUBLIC CommandSwipeData { double mnVelocityX; @@ -334,6 +331,7 @@ public: double getVelocityX() const { return mnVelocityX; } }; + class VCL_DLLPUBLIC CommandLongPressData { double mnX; @@ -354,7 +352,6 @@ public: }; -// - CommandEvent - enum class CommandEventId { NONE = 0, @@ -381,6 +378,7 @@ enum class CommandEventId LongPress = 22, }; + class VCL_DLLPUBLIC CommandEvent { private: @@ -410,6 +408,7 @@ public: const CommandLongPressData* GetLongPressData() const; }; + inline CommandEvent::CommandEvent() { mpData = nullptr; @@ -417,6 +416,7 @@ inline CommandEvent::CommandEvent() mbMouseEvent = false; } + inline CommandEvent::CommandEvent( const Point& rMousePos, CommandEventId nCmd, bool bMEvt, const void* pCmdData ) : maPos( rMousePos ) @@ -426,6 +426,7 @@ inline CommandEvent::CommandEvent( const Point& rMousePos, mbMouseEvent = bMEvt; } + inline const CommandExtTextInputData* CommandEvent::GetExtTextInputData() const { if ( mnCommand == CommandEventId::ExtTextInput ) @@ -434,6 +435,7 @@ inline const CommandExtTextInputData* CommandEvent::GetExtTextInputData() const return nullptr; } + inline const CommandWheelData* CommandEvent::GetWheelData() const { if ( mnCommand == CommandEventId::Wheel ) @@ -442,6 +444,7 @@ inline const CommandWheelData* CommandEvent::GetWheelData() const return nullptr; } + inline const CommandScrollData* CommandEvent::GetAutoScrollData() const { if ( mnCommand == CommandEventId::AutoScroll ) @@ -450,6 +453,7 @@ inline const CommandScrollData* CommandEvent::GetAutoScrollData() const return nullptr; } + inline const CommandModKeyData* CommandEvent::GetModKeyData() const { if( mnCommand == CommandEventId::ModKeyChange ) @@ -458,6 +462,7 @@ inline const CommandModKeyData* CommandEvent::GetModKeyData() const return nullptr; } + inline const CommandDialogData* CommandEvent::GetDialogData() const { if( mnCommand == CommandEventId::ShowDialog ) @@ -466,6 +471,7 @@ inline const CommandDialogData* CommandEvent::GetDialogData() const return nullptr; } + inline CommandMediaData* CommandEvent::GetMediaData() const { if( mnCommand == CommandEventId::Media ) @@ -474,6 +480,7 @@ inline CommandMediaData* CommandEvent::GetMediaData() const return nullptr; } + inline const CommandSelectionChangeData* CommandEvent::GetSelectionChangeData() const { if( mnCommand == CommandEventId::SelectionChange ) @@ -482,6 +489,7 @@ inline const CommandSelectionChangeData* CommandEvent::GetSelectionChangeData() return nullptr; } + inline const CommandSwipeData* CommandEvent::GetSwipeData() const { if( mnCommand == CommandEventId::Swipe ) @@ -490,6 +498,7 @@ inline const CommandSwipeData* CommandEvent::GetSwipeData() const return nullptr; } + inline const CommandLongPressData* CommandEvent::GetLongPressData() const { if( mnCommand == CommandEventId::LongPress ) |