SidebarWin.hxx (1d2dbeb0) SidebarWin.hxx (dec99bbd)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 32 unchanged lines hidden (view full) ---

41class SwPostItField;
42class OutlinerView;
43class Outliner;
44class ScrollBar;
45class SwEditWin;
46class SwView;
47class Edit;
48class MenuButton;
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 32 unchanged lines hidden (view full) ---

41class SwPostItField;
42class OutlinerView;
43class Outliner;
44class ScrollBar;
45class SwEditWin;
46class SwView;
47class Edit;
48class MenuButton;
49//class SwRedline;
50class SwFrm;
51
49class SwFrm;
50
51namespace sw { namespace overlay {
52 class OverlayRanges;
53}}
52
53namespace sw { namespace sidebarwindows {
54
55class SidebarTxtControl;
56class AnchorOverlayObject;
57class ShadowOverlayObject;
58
59typedef sal_Int64 SwPostItBits;
60
61#define PB_Preview ((SwPostItBits)0x00000001)
62
63
64class SwSidebarWin : public Window
65{
54
55namespace sw { namespace sidebarwindows {
56
57class SidebarTxtControl;
58class AnchorOverlayObject;
59class ShadowOverlayObject;
60
61typedef sal_Int64 SwPostItBits;
62
63#define PB_Preview ((SwPostItBits)0x00000001)
64
65
66class SwSidebarWin : public Window
67{
66 public:
68 public:
67 SwSidebarWin( SwEditWin& rEditWin,
68 WinBits nBits,
69 SwPostItMgr& aMgr,
70 SwPostItBits aBits,
71 SwSidebarItem& rSidebarItem );
72 virtual ~SwSidebarWin();
73
74 void SetSize( const Size& rNewSize );
75 void SetPosSizePixelRect( long nX,
76 long nY,
77 long nWidth,
78 long nHeight,
69 SwSidebarWin( SwEditWin& rEditWin,
70 WinBits nBits,
71 SwPostItMgr& aMgr,
72 SwPostItBits aBits,
73 SwSidebarItem& rSidebarItem );
74 virtual ~SwSidebarWin();
75
76 void SetSize( const Size& rNewSize );
77 void SetPosSizePixelRect( long nX,
78 long nY,
79 long nWidth,
80 long nHeight,
79 const SwRect &aRect,
81 const SwRect& aAnchorRect,
80 const long PageBorder);
81 void SetPosAndSize();
82 void TranslateTopPosition(const long aAmount);
83 virtual void CheckMetaText();
84
85 inline Point GetAnchorPos() { return mAnchorRect.Pos(); }
86 SwEditWin* EditWin();
87
88 inline OutlinerView* GetOutlinerView() { return mpOutlinerView;}
89 bool HasScrollbar() const;
90 bool IsScrollbarVisible() const;
91 inline ScrollBar* Scrollbar() { return mpVScrollbar; }
92 inline ::sw::sidebarwindows::AnchorOverlayObject* Anchor() { return mpAnchor;}
93 inline ::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow;}
82 const long PageBorder);
83 void SetPosAndSize();
84 void TranslateTopPosition(const long aAmount);
85 virtual void CheckMetaText();
86
87 inline Point GetAnchorPos() { return mAnchorRect.Pos(); }
88 SwEditWin* EditWin();
89
90 inline OutlinerView* GetOutlinerView() { return mpOutlinerView;}
91 bool HasScrollbar() const;
92 bool IsScrollbarVisible() const;
93 inline ScrollBar* Scrollbar() { return mpVScrollbar; }
94 inline ::sw::sidebarwindows::AnchorOverlayObject* Anchor() { return mpAnchor;}
95 inline ::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow;}
96 inline ::sw::overlay::OverlayRanges* TextRange() { return mpTextRangeOverlay;}
94
95 long GetPostItTextHeight();
96
97
98 long GetPostItTextHeight();
99
97 void SwitchToPostIt(sal_uInt16 aDirection);
98 virtual void SwitchToFieldPos();
100 void SwitchToPostIt(sal_uInt16 aDirection);
101 virtual void SwitchToFieldPos();
99
100 virtual sal_uInt32 MoveCaret() = 0;
101
102
103 virtual sal_uInt32 MoveCaret() = 0;
104
102 virtual void UpdateData() = 0;
103 virtual void SetPostItText() = 0;
104 virtual void Delete();
105 virtual void GotoPos() = 0;
105 virtual void UpdateData() = 0;
106 virtual void SetPostItText() = 0;
107 virtual void Delete();
108 virtual void GotoPos() = 0;
106
107 virtual String GetAuthor() = 0;
108 virtual Date GetDate() = 0;
109 virtual Time GetTime() = 0;
110
109
110 virtual String GetAuthor() = 0;
111 virtual Date GetDate() = 0;
112 virtual Time GetTime() = 0;
113
111 void ExecuteCommand(sal_uInt16 nSlot);
112 void InitControls();
114 void ExecuteCommand(sal_uInt16 nSlot);
115 void InitControls();
113 void HidePostIt();
114 void DoResize();
116 void HidePostIt();
117 void DoResize();
115 void ResizeIfNeccessary(long aOldHeight, long aNewHeight);
116 void SetScrollbar();
118 void ResizeIfNeccessary(long aOldHeight, long aNewHeight);
119 void SetScrollbar();
117
120
118 void SetVirtualPosSize( const Point& aPoint, const Size& aSize);
119 const Point VirtualPos() { return mPosSize.TopLeft(); }
120 const Size VirtualSize() { return mPosSize.GetSize(); }
121 void SetVirtualPosSize( const Point& aPoint, const Size& aSize);
122 const Point VirtualPos() { return mPosSize.TopLeft(); }
123 const Size VirtualSize() { return mPosSize.GetSize(); }
121
122 void ShowAnchorOnly(const Point &aPoint);
123 void ShowNote();
124 void HideNote();
125
124
125 void ShowAnchorOnly(const Point &aPoint);
126 void ShowNote();
127 void HideNote();
128
126 void ResetAttributes();
129 void ResetAttributes();
127
128 void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition);
130
131 void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition);
129 void SetReadonly(sal_Bool bSet);
130 sal_Bool IsReadOnly() { return mbReadonly;}
131 bool IsPreview() { return nFlags & PB_Preview;}
132 void SetReadonly(sal_Bool bSet);
133 sal_Bool IsReadOnly()
134 {
135 return mbReadonly;
136 }
137 bool IsPreview()
138 {
139 return nFlags & PB_Preview;
140 }
132
141
133 void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor);
142 void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor);
134 const Color& ColorAnchor() { return mColorAnchor; }
135 const Color& ColorDark() { return mColorDark; }
136 const Color& ColorLight() { return mColorLight; }
143 const Color& ColorAnchor() { return mColorAnchor; }
144 const Color& ColorDark() { return mColorDark; }
145 const Color& ColorLight() { return mColorLight; }
137 void Rescale();
146 void Rescale();
138
139 void SetViewState(::sw::sidebarwindows::ViewState bViewState);
140
141 bool IsFollow() { return mbIsFollow; }
142 void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; };
143 virtual bool CalcFollow() = 0;
144
147
148 void SetViewState(::sw::sidebarwindows::ViewState bViewState);
149
150 bool IsFollow() { return mbIsFollow; }
151 void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; };
152 virtual bool CalcFollow() = 0;
153
145#if 0
146#endif
154 sal_Int32 GetMetaHeight();
155 sal_Int32 GetMinimumSizeWithMeta();
156 sal_Int32 GetMinimumSizeWithoutMeta();
157 sal_Int32 GetMetaButtonAreaWidth();
158 sal_Int32 GetScrollbarWidth();
147
159
148 sal_Int32 GetMetaHeight();
149 sal_Int32 GetMinimumSizeWithMeta();
150 sal_Int32 GetMinimumSizeWithoutMeta();
151 sal_Int32 GetMetaButtonAreaWidth();
152 sal_Int32 GetScrollbarWidth();
160 void SetSpellChecking();
153
161
154 void SetSpellChecking();
162 void ToggleInsMode();
155
163
156 void ToggleInsMode();
164 virtual void ActivatePostIt();
165 virtual void DeactivatePostIt();
157
166
158 virtual void ActivatePostIt();
159 virtual void DeactivatePostIt();
160
161 void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus,
162 const Color& aColor);
163 SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; }
164 Color GetChangeColor() { return mChangeColor; }
165
167 void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus,
168 const Color& aColor);
169 SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; }
170 Color GetChangeColor() { return mChangeColor; }
171
166 virtual bool IsProtected() {return mbReadonly;};
172 virtual bool IsProtected()
173 {
174 return mbReadonly;
175 }
167
168 DECL_LINK( WindowEventListener, VclSimpleEvent* );
169 inline bool IsMouseOverSidebarWin() const { return mbMouseOver; }
170
171 void SetLanguage(const SvxLanguageItem aNewItem);
172
173 void ChangeSidebarItem( SwSidebarItem& rSidebarItem );
174 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();

--- 33 unchanged lines hidden (view full) ---

208 sw::sidebarwindows::SidebarTxtControl* mpSidebarTxtControl;
209 ScrollBar* mpVScrollbar;
210 Edit* mpMetadataAuthor;
211 Edit* mpMetadataDate;
212 MenuButton* mpMenuButton;
213
214 sw::sidebarwindows::AnchorOverlayObject* mpAnchor;
215 sw::sidebarwindows::ShadowOverlayObject* mpShadow;
176
177 DECL_LINK( WindowEventListener, VclSimpleEvent* );
178 inline bool IsMouseOverSidebarWin() const { return mbMouseOver; }
179
180 void SetLanguage(const SvxLanguageItem aNewItem);
181
182 void ChangeSidebarItem( SwSidebarItem& rSidebarItem );
183 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();

--- 33 unchanged lines hidden (view full) ---

217 sw::sidebarwindows::SidebarTxtControl* mpSidebarTxtControl;
218 ScrollBar* mpVScrollbar;
219 Edit* mpMetadataAuthor;
220 Edit* mpMetadataDate;
221 MenuButton* mpMenuButton;
222
223 sw::sidebarwindows::AnchorOverlayObject* mpAnchor;
224 sw::sidebarwindows::ShadowOverlayObject* mpShadow;
225 sw::overlay::OverlayRanges* mpTextRangeOverlay;
216
217 Color mColorAnchor;
218 Color mColorDark;
219 Color mColorLight;
220 Color mChangeColor;
221
222 sw::sidebarwindows::SidebarPosition meSidebarPosition;
223

--- 47 unchanged lines hidden ---
226
227 Color mColorAnchor;
228 Color mColorDark;
229 Color mColorLight;
230 Color mChangeColor;
231
232 sw::sidebarwindows::SidebarPosition meSidebarPosition;
233

--- 47 unchanged lines hidden ---