28#include <bitmaps.hlst>
32#include <com/sun/star/accessibility/AccessibleEventId.hpp>
44 while ( _pWindow && nFlags == GetFocusFlags::NONE )
54 using namespace com::sun::star::accessibility::AccessibleEventId;
86 if (pEvt == pEvent.get())
202 nStartEvent =
nullptr;
207 aController->GetWindow().GrabFocus();
212 sal_uInt16 nColumnId )
const
259 aBitmap =
BitmapEx(BMP_CURRENT_PRIMARYKEY);
265 aBitmap =
BitmapEx(BMP_HEADERFOOTER);
272 aBitmap.
Mirror( BmpMirrorFlags::Horizontal );
274 return Image(aBitmap);
292 DrawTextFlags::Center | DrawTextFlags::VCenter | DrawTextFlags::Clip );
314 rDev.
DrawImage( aPos, aImageSize, aImage );
354 aCellController->GetWindow().GrabFocus();
384 if (!bCtrl && !bShift)
394 else if (!bCtrl && bShift)
474 return pControlBase->ControlHasFocus();
475 return pControlWindow && pControlWindow->HasChildPathFocus();
523 bool bLocalSelect =
false;
524 bool bNonEditOnly =
false;
527 if (!bAlt && !bCtrl && !bShift )
562 if ( !bAlt && !bCtrl && bShift )
575 if ( !bAlt && bCtrl && bShift )
582 if ( !bAlt && bCtrl && !bShift )
626 if (rEvt.
GetType() == NotifyEventType::KEYINPUT)
650 case NotifyEventType::GETFOCUS:
654 case NotifyEventType::LOSEFOCUS:
669 bool bNeedCellReActivation =
false;
670 if (
nType == StateChangedType::Mirroring )
672 bNeedCellReActivation =
true;
674 else if (
nType == StateChangedType::Zoom )
677 bNeedCellReActivation =
true;
679 else if (
nType == StateChangedType::ControlFont )
684 else if (
nType == StateChangedType::ControlForeground )
689 else if (
nType == StateChangedType::ControlBackground )
694 else if (
nType == StateChangedType::Style)
702 if ( bNeedCellReActivation )
717 if ((( rDCEvt.
GetType() == DataChangedEventType::SETTINGS ) ||
718 ( rDCEvt.
GetType() == DataChangedEventType::DISPLAY )) &&
719 ( rDCEvt.
GetFlags() & AllSettingsFlags::STYLE ))
744 if (bFont || bForeground)
778 sal_uInt16 nInfo = 0;
787 if (!nInfo && nNewColId !=
nEditCol)
1012 nEndEvent =
nullptr;
1020 if (nCellModifiedEvent)
1028 nCellModifiedEvent =
nullptr;
1064 DBG_ASSERT(
nId,
"EditBrowseBox::AppendColumn: invalid id!");
1086 sal_uInt16 nX =
static_cast<sal_uInt16
>(aPoint.
X());
1099 nX =
static_cast<sal_uInt16
>(aPoint.
X());
1117 Control& rControl = rController->GetWindow();
1119 if (nMinHeight > aSize.
Height())
1121 auto nOffset = (nMinHeight - aSize.
Height()) / 2;
1156 sal_uInt32 nMinColWidth =
CalcZoom(20);
1157 sal_uInt32 nNewColWidth = nMinColWidth;
1159 sal_Int32 nLastVisRow =
GetTopRow() + nMaxRows - 1;
1166 if (nNewColWidth == nCurColWidth)
1171 return nNewColWidth;
1221 if (RowPicturesChanges)
1232 , bSuspended( true )
1236 DBG_ASSERT(!
pWindow->IsVisible(),
"CellController::CellController: window should not be visible!");
#define BROWSER_CURSORDOWN
#define BROWSER_SELECTDOWN
#define BROWSER_SCROLLDOWN
#define BROWSER_CURSORLEFT
#define BROWSER_CURSORHOME
#define BROWSER_CURSOREND
#define BROWSER_SELECTEND
#define BROWSER_SELECTHOME
#define BROWSER_INVALIDID
#define BROWSER_CURSORENDOFSCREEN
#define BROWSER_ENHANCESELECTION
#define BROWSER_CURSORENDOFFILE
#define BROWSER_CURSORPAGEUP
#define BROWSER_CURSORTOPOFSCREEN
#define BROWSER_CURSORPAGEDOWN
#define BROWSER_CURSORRIGHT
#define BROWSER_CURSORTOPOFFILE
#define BROWSER_SELECTCOLUMN
const StyleSettings & GetStyleSettings() const
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
static bool IsUICaptured()
static vcl::Window * GetFocusWindow()
bool Mirror(BmpMirrorFlags nMirrorFlags)
sal_uInt16 GetVisibleRows() const
sal_uInt16 GetColumnId(sal_uInt16 nPos) const
virtual void GetFocus() override
tools::Rectangle GetControlArea() const
virtual void dispose() override
virtual void MouseButtonDown(const MouseEvent &rEvt) override
BrowserDataWin & GetDataWindow() const
void InsertDataColumn(sal_uInt16 nItemId, const OUString &rText, tools::Long nSize, HeaderBarItemBits nBits=HeaderBarItemBits::STDSTYLE, sal_uInt16 nPos=HEADERBAR_APPEND)
sal_Int32 FirstSelectedColumn() const
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell(sal_Int32 nRow, sal_uInt16 nColumnPos) override
Creates the accessible object of a data table cell.
sal_Int32 GetCurRow() const
sal_uInt16 GetSelectColumnCount() const
virtual void ImplStartTracking()
virtual void StateChanged(StateChangedType nStateChange) override
virtual void GrabFocus() override
const MultiSelection * GetSelection() const
sal_Int32 GetTopRow() const
sal_uInt16 ColCount() const
void SelectColumnPos(sal_uInt16 nCol, bool _bSelect, bool bMakeVisible)
void commitTableEvent(sal_Int16 nEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue)
commitTableEvent commit the event at all listeners of the table
bool GoToRowColumnId(sal_Int32 nRow, sal_uInt16 nColId)
virtual void MouseButtonUp(const MouseEvent &rEvt) override
void SetColumnWidth(sal_uInt16 nColumnId, sal_uLong nWidth)
sal_uInt16 GetColumnPos(sal_uInt16 nColumnId) const
sal_Int32 GetSelectRowCount() const
OUString GetColumnTitle(sal_uInt16 nColumnId) const
static const sal_uInt16 HandleColumnId
virtual OUString GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const
GetCellText returns the text at the given position.
sal_uLong GetDefaultColumnWidth(const OUString &_rText) const
suggests a default width for a column containing a given text
tools::Rectangle GetFieldRectPixel(sal_Int32 nRow, sal_uInt16 nColId, bool bRelToBrowser=true) const
void Dispatch(sal_uInt16 nId)
virtual void Resize() override
bool ReserveControlArea(sal_uInt16 nWidth=USHRT_MAX)
virtual sal_Int32 GetRowCount() const override
bool isAccessibleAlive() const
return <TRUE> if and only if the accessible object for this instance has been created and is alive
BrowserMode GetMode() const
virtual void LoseFocus() override
virtual void SetNoSelection() override
virtual void KeyInput(const KeyEvent &rEvt) override
virtual void ColumnMoved(sal_uInt16 nColId)
virtual void ImplEndTracking()
virtual void RowHeightChanged()
called when the row height has been changed interactively
sal_uLong GetColumnWidth(sal_uInt16 nColumnId) const
void commitBrowseBoxEvent(sal_Int16 nEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue)
commitBrowseBoxEvent commit the event at all listeners of the browsebox
vcl::Window * GetWindow() const
const tools::Rectangle & GetRect() const
sal_uInt16 GetColumn() const
sal_uInt16 GetColumnId() const
virtual bool EventNotify(NotifyEvent &rNEvt) override
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
Size GetSizePixel() const
const vcl::KeyCode & GetKeyCode() const
sal_uInt16 GetClicks() const
const KeyEvent * GetKeyEvent() const
vcl::Window * GetWindow() const
NotifyEventType GetType() const
bool IsClipRegion() const
void DrawImage(const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
OutDevType GetOutDevType() const
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
virtual vcl::Window * GetOwnerWindow() const
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetFieldTextColor() const
const Color & GetFieldColor() const
const vcl::Font & GetFieldFont() const
static VclPtr< reference_type > Create(Arg &&... arg)
ControlBase & GetWindow() const
virtual ~CellController() override
CellController(ControlBase *pW)
virtual void ActivatingMouseEvent(const BrowserMouseEvent &rEvt, bool bUp)
virtual bool MoveAllowed(const KeyEvent &rEvt) const
virtual void CommitModifications()
VclPtr< ControlBase > pWindow
void Set(const BrowserMouseEvent *pEvt, bool bIsDown)
std::unique_ptr< BrowserMouseEvent > pEvent
SVT_DLLPUBLIC void Clear()
VclPtr< CheckBoxControl > pCheckBoxPaint
virtual CellController * GetController(sal_Int32 nRow, sal_uInt16 nCol)
ImplSVEvent * nStartEvent
SVT_DLLPRIVATE void DetermineFocus(const GetFocusFlags _nGetFocusFlags=GetFocusFlags::NONE)
EditBrowseBox(EditBrowseBox const &)=delete
virtual ~EditBrowseBox() override
virtual void PaintCell(OutputDevice &rDev, const tools::Rectangle &rRect, sal_uInt16 nColId) const =0
sal_uInt32 GetAutoColumnWidth(sal_uInt16 nColId)
CellControllerRef aOldController
virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId)
virtual void ColumnResized(sal_uInt16 nColId) override
CellControllerRef aController
virtual void EndScroll() override
virtual void Dispatch(sal_uInt16 nId)
std::unique_ptr< EditBrowseBoxImpl > m_aImpl
virtual bool IsTabAllowed(bool bForward) const
tools::Rectangle GetCellRect(sal_Int32 nRow, sal_uInt16 nColId, bool bRelToBrowser=true) const
void implCreateActiveAccessible()
virtual void ChildFocusIn() override
virtual void ChildFocusOut() override
virtual void CursorMoved() override
virtual void DeactivateCell(bool bUpdate=true)
virtual void MouseButtonDown(const BrowserMouseEvent &rEvt) override
const CellControllerRef & Controller() const
virtual void KeyInput(const KeyEvent &rEvt) override
Image GetImage(RowStatus) const
class svt::EditBrowseBox::BrowserMouseEventPtr aMouseEvent
virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol)
virtual VclPtr< BrowserHeader > CreateHeaderBar(BrowseBox *pParent) override
virtual void Resize() override
void EnableAndShow() const
virtual RowStatus GetRowStatus(sal_Int32 nRow) const
virtual void RemoveRows()
virtual void LoseFocus() override
virtual bool PreNotify(NotifyEvent &rNEvt) override
virtual void StateChanged(StateChangedType nType) override
virtual bool SaveModified()
EditBrowseBoxFlags GetBrowserFlags() const
virtual bool IsCursorMoveAllowed(sal_Int32 nNewRow, sal_uInt16 nNewColId) const override
virtual void ColumnMoved(sal_uInt16 nId) override
virtual void ImplEndTracking() override
void InvalidateStatusCell(sal_Int32 nRow)
bool ControlHasFocus() const
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
ImplSVEvent * nCellModifiedEvent
EditBrowseBoxFlags m_nBrowserFlags
bool bActiveBeforeTracking
void SetBrowserFlags(EditBrowseBoxFlags nFlags)
virtual void PaintStatusCell(OutputDevice &rDev, const tools::Rectangle &rRect) const
void PaintTristate(const tools::Rectangle &rRect, const TriState &eState, bool _bEnabled=true) const
virtual sal_uInt16 AppendColumn(const OUString &rName, sal_uInt16 nWidth, sal_uInt16 nPos=HEADERBAR_APPEND, sal_uInt16 nId=sal_uInt16(-1))
virtual bool SeekRow(sal_Int32 nRow) override
seeks for the given row position
void InvalidateHandleColumn()
VclPtr< vcl::Window > m_pFocusWhileRequest
virtual bool ProcessKey(const KeyEvent &rEvt) override
virtual void MouseButtonUp(const BrowserMouseEvent &rEvt) override
virtual VclPtr< BrowserHeader > imp_CreateHeaderBar(BrowseBox *pParent)
virtual bool IsModified() const
virtual void GetFocus() override
virtual void ImplStartTracking() override
virtual void ArrangeControls(sal_uInt16 &nX, sal_uInt16 nY)
virtual void DoubleClick(const BrowserMouseEvent &) override
virtual void PaintField(vcl::RenderContext &rDev, const tools::Rectangle &rRect, sal_uInt16 nColumnId) const override
virtual void dispose() override
virtual bool EventNotify(NotifyEvent &rNEvt) override
VclPtr< BrowserHeader > pHeader
static void ResizeController(CellControllerRef const &rController, const tools::Rectangle &)
virtual void RowHeightChanged() override
called when the row height has been changed interactively
SVT_DLLPRIVATE void implActivateCellOnMouseEvent(const BrowserMouseEvent &_rEvt, bool _bUp)
virtual void InitController(CellControllerRef &rController, sal_Int32 nRow, sal_uInt16 nCol)
virtual void CellModified()
virtual ~IEditImplementation()=0
void Merge(const Font &rFont)
sal_uInt16 GetCode() const
void SetStyle(WinBits nStyle)
vcl::Window * GetParent() const
GetFocusFlags GetGetFocusFlags() const
void SetControlForeground()
bool HasChildPathFocus(bool bSystemWindow=false) const
bool IsControlFont() const
void SetZoomedPointFont(vcl::RenderContext &rRenderContext, const vcl::Font &rFont)
Size get_preferred_size() const
tools::Long CalcZoom(tools::Long n) const
vcl::Window * GetWindow(GetWindowType nType) const
const Color & GetControlForeground() const
void SetControlBackground()
bool IsUpdateMode() const
void Disable(bool bChild=true)
virtual Point GetPosPixel() const
void Enable(bool bEnable=true, bool bChild=true)
bool IsControlForeground() const
const AllSettings & GetSettings() const
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
virtual void KeyInput(const KeyEvent &rKEvt)
virtual bool PreNotify(NotifyEvent &rNEvt)
vcl::Font GetControlFont() const
::OutputDevice const * GetOutDev() const
bool IsRTLEnabled() const
Size GetOutputSizePixel() const
Window(vcl::Window *pParent, WinBits nStyle=0)
bool IsControlBackground() const
virtual void DataChanged(const DataChangedEvent &rDCEvt)
const Color & GetControlBackground() const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
void SetCompoundControl(bool bCompound)
void SetTextColor(const Color &rColor)
void EnablePaint(bool bEnable)
#define DBG_ASSERT(sCon, aError)
@ ACTIVATE_ON_BUTTONDOWN
set this bit to activate the cell on a MouseButtonDown, not a MouseButtonUp event
@ HANDLE_COLUMN_TEXT
if this bit is set and EditBrowseBoxFlags::NO_HANDLE_COLUMN_CONTENT is not set, the handle column is ...
@ NO_HANDLE_COLUMN_CONTENT
if this bit is not set, the handle column will be invalidated upon changing the row in the browse box...
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_HOME
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_END
#define LINK(Instance, Class, Member)
tools::SvRef< CellController > CellControllerRef
IMPL_LINK_NOARG(OCommonPicker, OnCancelPicker, void *, void)
@ ACTIVE_DESCENDANT_CHANGED
WinBits const WB_NOTABSTOP