OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ | 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ |
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ | 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ |
9 | 9 |
10 #include "../../../core/include/fxcrt/fx_basic.h" | 10 #include "../../../core/include/fxcrt/fx_basic.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 /* | 130 /* |
131 COLORTYPE_TRANSPARENT | 131 COLORTYPE_TRANSPARENT |
132 COLORTYPE_RGB | 132 COLORTYPE_RGB |
133 COLORTYPE_CMYK | 133 COLORTYPE_CMYK |
134 COLORTYPE_GRAY | 134 COLORTYPE_GRAY |
135 */ | 135 */ |
136 int32_t nColorType; | 136 int32_t nColorType; |
137 FX_FLOAT fColor1,fColor2,fColor3,
fColor4; | 137 FX_FLOAT fColor1,fColor2,fColor3,
fColor4; |
138 }; | 138 }; |
139 | 139 |
140 inline FX_BOOL operator == (const CPWL_Color &c1, const CPWL_Color &c2) | 140 inline bool operator == (const CPWL_Color &c1, const CPWL_Color &c2) |
141 { | 141 { |
142 return c1.nColorType == c2.nColorType && | 142 return c1.nColorType == c2.nColorType && |
143 c1.fColor1 - c2.fColor1 < 0.0001 && c1.fColor1 - c2.fColor1 > -0
.0001 && | 143 c1.fColor1 - c2.fColor1 < 0.0001 && c1.fColor1 - c2.fColor1 > -0
.0001 && |
144 c1.fColor2 - c2.fColor2 < 0.0001 && c1.fColor2 - c2.fColor2 > -0
.0001 && | 144 c1.fColor2 - c2.fColor2 < 0.0001 && c1.fColor2 - c2.fColor2 > -0
.0001 && |
145 c1.fColor3 - c2.fColor3 < 0.0001 && c1.fColor3 - c2.fColor3 > -0
.0001 && | 145 c1.fColor3 - c2.fColor3 < 0.0001 && c1.fColor3 - c2.fColor3 > -0
.0001 && |
146 c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0
.0001; | 146 c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0
.0001; |
147 } | 147 } |
148 | 148 |
149 inline FX_BOOL operator != (const CPWL_Color &c1, const CPWL_Color &c2) | 149 inline bool operator != (const CPWL_Color &c1, const CPWL_Color &c2) |
150 { | 150 { |
151 return !operator == (c1, c2); | 151 return !operator == (c1, c2); |
152 } | 152 } |
153 | 153 |
154 #define PWL_SCROLLBAR_WIDTH 12.0f | 154 #define PWL_SCROLLBAR_WIDTH 12.0f |
155 #define PWL_SCROLLBAR_BUTTON_WIDTH 9.0f | 155 #define PWL_SCROLLBAR_BUTTON_WIDTH 9.0f |
156 #define PWL_SCROLLBAR_POSBUTTON_MINWIDTH 2.0f | 156 #define PWL_SCROLLBAR_POSBUTTON_MINWIDTH 2.0f |
157 #define PWL_SCROLLBAR_TRANSPARANCY 150 | 157 #define PWL_SCROLLBAR_TRANSPARANCY 150 |
158 #define PWL_SCROLLBAR_BKCOLOR CPWL_Color(COLORTYPE_RGB
,220.0f/255.0f,220.0f/255.0f,220.0f/255.0f) | 158 #define PWL_SCROLLBAR_BKCOLOR CPWL_Color(COLORTYPE_RGB
,220.0f/255.0f,220.0f/255.0f,220.0f/255.0f) |
159 #define PWL_DEFAULT_SELTEXTCOLOR CPWL_Color(COLORTYPE_RGB
,1,1,1) | 159 #define PWL_DEFAULT_SELTEXTCOLOR CPWL_Color(COLORTYPE_RGB
,1,1,1) |
160 #define PWL_DEFAULT_SELBACKCOLOR CPWL_Color(COLORTYPE_RGB
,0,51.0f/255.0f,113.0f/255.0f) | 160 #define PWL_DEFAULT_SELBACKCOLOR CPWL_Color(COLORTYPE_RGB
,0,51.0f/255.0f,113.0f/255.0f) |
161 #define PWL_DEFAULT_BACKCOLOR PWL_DEFAULT_SELTEXTCOLOR | 161 #define PWL_DEFAULT_BACKCOLOR PWL_DEFAULT_SELTEXTCOLOR |
162 #define PWL_DEFAULT_TEXTCOLOR CPWL_Color(COLORTYPE_RGB
,0,0,0) | 162 #define PWL_DEFAULT_TEXTCOLOR CPWL_Color(COLORTYPE_RGB
,0,0,0) |
163 #define PWL_DEFAULT_FONTSIZE 9.0f | 163 #define PWL_DEFAULT_FONTSIZE 9.0f |
164 #define PWL_DEFAULT_BLACKCOLOR CPWL_Color(COLORTYPE_GRA
Y,0) | 164 #define PWL_DEFAULT_BLACKCOLOR CPWL_Color(COLORTYPE_GRA
Y,0) |
165 #define PWL_DEFAULT_WHITECOLOR CPWL_Color(COLORTYPE_GRA
Y,1) | 165 #define PWL_DEFAULT_WHITECOLOR CPWL_Color(COLORTYPE_GRA
Y,1) |
166 #define PWL_DEFAULT_HEAVYGRAYCOLOR CPWL_Color(COLORTYPE_GRA
Y,0.50) | 166 #define PWL_DEFAULT_HEAVYGRAYCOLOR CPWL_Color(COLORTYPE_GRA
Y,0.50) |
167 #define PWL_DEFAULT_LIGHTGRAYCOLOR CPWL_Color(COLORTYPE_GRA
Y,0.75) | 167 #define PWL_DEFAULT_LIGHTGRAYCOLOR CPWL_Color(COLORTYPE_GRA
Y,0.75) |
168 #define PWL_TRIANGLE_HALFLEN 2.0f | 168 #define PWL_TRIANGLE_HALFLEN 2.0f |
169 #define PWL_CBBUTTON_TRIANGLE_HALFLEN 3.0f | 169 #define PWL_CBBUTTON_TRIANGLE_HALFLEN 3.0f |
170 #define PWL_INVALIDATE_INFLATE 2 | 170 #define PWL_INVALIDATE_INFLATE 2 |
171 | 171 |
172 class IPWL_SpellCheck | 172 class IPWL_SpellCheck |
173 { | 173 { |
174 public: | 174 public: |
175 virtual ~IPWL_SpellCheck() { } | 175 virtual ~IPWL_SpellCheck() { } |
176 » virtual FX_BOOL»» » » » » » CheckWor
d(const FX_CHAR* sWord) = 0; | 176 » virtual bool» » » » » » » CheckWor
d(const FX_CHAR* sWord) = 0; |
177 virtual void SuggestW
ords(const FX_CHAR* sWord, CFX_ByteStringArray & sSuggest) = 0; | 177 virtual void SuggestW
ords(const FX_CHAR* sWord, CFX_ByteStringArray & sSuggest) = 0; |
178 }; | 178 }; |
179 | 179 |
180 class IPWL_Provider | 180 class IPWL_Provider |
181 { | 181 { |
182 public: | 182 public: |
183 virtual ~IPWL_Provider() { } | 183 virtual ~IPWL_Provider() { } |
184 | 184 |
185 //get a matrix which map user space to CWnd client space | 185 //get a matrix which map user space to CWnd client space |
186 virtual CPDF_Matrix GetWindo
wMatrix(void* pAttachedData) = 0; | 186 virtual CPDF_Matrix GetWindo
wMatrix(void* pAttachedData) = 0; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 class PWL_CLASS CPWL_Wnd : public CPWL_TimerHandler | 291 class PWL_CLASS CPWL_Wnd : public CPWL_TimerHandler |
292 { | 292 { |
293 friend class CPWL_MsgControl; | 293 friend class CPWL_MsgControl; |
294 public: | 294 public: |
295 CPWL_Wnd(); | 295 CPWL_Wnd(); |
296 virtual ~CPWL_Wnd(); | 296 virtual ~CPWL_Wnd(); |
297 | 297 |
298 void Create(const PWL
_CREATEPARAM & cp); | 298 void Create(const PWL
_CREATEPARAM & cp); |
299 virtual CFX_ByteString GetClassName() const; | 299 virtual CFX_ByteString GetClassName() const; |
300 void Destroy(); | 300 void Destroy(); |
301 » void» » » » » » » Move(const CPDF_
Rect & rcNew,FX_BOOL bReset,FX_BOOL bRefresh); | 301 » void» » » » » » » Move(const CPDF_
Rect & rcNew,bool bReset,bool bRefresh); |
302 virtual void InvalidateRect(CPDF_Rect
* pRect = NULL); | 302 virtual void InvalidateRect(CPDF_Rect
* pRect = NULL); |
303 | 303 |
304 void GetAppearanceStr
eam(CFX_ByteString & sAppStream); | 304 void GetAppearanceStr
eam(CFX_ByteString & sAppStream); |
305 void DrawAppearance(C
FX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); | 305 void DrawAppearance(C
FX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); |
306 | 306 |
307 » virtual FX_BOOL»» » » » OnKeyDown(FX_WORD nChar,
FX_DWORD nFlag); | 307 » virtual bool» » » » » OnKeyDown(FX_WORD nChar,
FX_DWORD nFlag); |
308 » virtual FX_BOOL»» » » » OnKeyUp(FX_WORD nChar, F
X_DWORD nFlag); | 308 » virtual bool» » » » » OnKeyUp(FX_WORD nChar, F
X_DWORD nFlag); |
309 » virtual FX_BOOL»» » » » OnChar(FX_WORD nChar, FX
_DWORD nFlag); | 309 » virtual bool» » » » » OnChar(FX_WORD nChar, FX
_DWORD nFlag); |
310 » virtual FX_BOOL»» » » » OnLButtonDblClk(const CP
DF_Point & point, FX_DWORD nFlag); | 310 » virtual bool» » » » » OnLButtonDblClk(const CP
DF_Point & point, FX_DWORD nFlag); |
311 » virtual FX_BOOL»» » » » OnLButtonDown(const CPDF
_Point & point, FX_DWORD nFlag); | 311 » virtual bool» » » » » OnLButtonDown(const CPDF
_Point & point, FX_DWORD nFlag); |
312 » virtual FX_BOOL»» » » » OnLButtonUp(const CPDF_P
oint & point, FX_DWORD nFlag); | 312 » virtual bool» » » » » OnLButtonUp(const CPDF_P
oint & point, FX_DWORD nFlag); |
313 » virtual FX_BOOL»» » » » OnMButtonDblClk(const CP
DF_Point & point, FX_DWORD nFlag); | 313 » virtual bool» » » » » OnMButtonDblClk(const CP
DF_Point & point, FX_DWORD nFlag); |
314 » virtual FX_BOOL»» » » » OnMButtonDown(const CPDF
_Point & point, FX_DWORD nFlag); | 314 » virtual bool» » » » » OnMButtonDown(const CPDF
_Point & point, FX_DWORD nFlag); |
315 » virtual FX_BOOL»» » » » OnMButtonUp(const CPDF_P
oint & point, FX_DWORD nFlag); | 315 » virtual bool» » » » » OnMButtonUp(const CPDF_P
oint & point, FX_DWORD nFlag); |
316 » virtual FX_BOOL»» » » » OnRButtonDown(const CPDF
_Point & point, FX_DWORD nFlag); | 316 » virtual bool» » » » » OnRButtonDown(const CPDF
_Point & point, FX_DWORD nFlag); |
317 » virtual FX_BOOL»» » » » OnRButtonUp(const CPDF_P
oint & point, FX_DWORD nFlag); | 317 » virtual bool» » » » » OnRButtonUp(const CPDF_P
oint & point, FX_DWORD nFlag); |
318 » virtual FX_BOOL»» » » » OnMouseMove(const CPDF_P
oint & point, FX_DWORD nFlag); | 318 » virtual bool» » » » » OnMouseMove(const CPDF_P
oint & point, FX_DWORD nFlag); |
319 » virtual FX_BOOL»» » » » OnMouseWheel(short zDelt
a, const CPDF_Point & point, FX_DWORD nFlag); | 319 » virtual bool» » » » » OnMouseWheel(short zDelt
a, const CPDF_Point & point, FX_DWORD nFlag); |
320 | 320 |
321 virtual void SetFocus(); | 321 virtual void SetFocus(); |
322 virtual void KillFocus(); | 322 virtual void KillFocus(); |
323 void SetCapture(); | 323 void SetCapture(); |
324 void ReleaseCapture()
; | 324 void ReleaseCapture()
; |
325 | 325 |
326 virtual void OnNotify(CPWL_Wnd* pWnd,
FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); | 326 virtual void OnNotify(CPWL_Wnd* pWnd,
FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); |
327 virtual void SetTextColor(const CPWL_
Color & color); | 327 virtual void SetTextColor(const CPWL_
Color & color); |
328 virtual void SetTextStrokeColor(const
CPWL_Color & color); | 328 virtual void SetTextStrokeColor(const
CPWL_Color & color); |
329 » virtual void» » » » » SetVisible(FX_BOOL bVisi
ble); | 329 » virtual void» » » » » SetVisible(bool bVisible
); |
330 | 330 |
331 virtual CPDF_Rect GetFocusRect() const; | 331 virtual CPDF_Rect GetFocusRect() const; |
332 virtual CPWL_Color GetBackgroundColor() con
st; | 332 virtual CPWL_Color GetBackgroundColor() con
st; |
333 virtual CPWL_Color GetBorderColor() const; | 333 virtual CPWL_Color GetBorderColor() const; |
334 virtual CPWL_Color GetTextColor() const; | 334 virtual CPWL_Color GetTextColor() const; |
335 virtual CPWL_Color GetTextStrokeColor() con
st; | 335 virtual CPWL_Color GetTextStrokeColor() con
st; |
336 virtual FX_FLOAT GetFontSize() const; | 336 virtual FX_FLOAT GetFontSize() const; |
337 virtual int32_t GetInnerBorderWidth() const; | 337 virtual int32_t GetInnerBorderWidth() const; |
338 virtual CPWL_Color GetBorderLeftTopColor(in
t32_t nBorderStyle) const; | 338 virtual CPWL_Color GetBorderLeftTopColor(in
t32_t nBorderStyle) const; |
339 virtual CPWL_Color GetBorderRightBottomColo
r(int32_t nBorderStyle) const; | 339 virtual CPWL_Color GetBorderRightBottomColo
r(int32_t nBorderStyle) const; |
340 | 340 |
341 » virtual FX_BOOL»» » » » IsModified() const {retu
rn FALSE;} | 341 » virtual bool» » » » » IsModified() const {retu
rn false;} |
342 | 342 |
343 virtual void SetFontSize(FX_FLOAT fFo
ntSize); | 343 virtual void SetFontSize(FX_FLOAT fFo
ntSize); |
344 | 344 |
345 void SetBackgroundCol
or(const CPWL_Color & color); | 345 void SetBackgroundCol
or(const CPWL_Color & color); |
346 void SetBorderColor(c
onst CPWL_Color & color); | 346 void SetBorderColor(c
onst CPWL_Color & color); |
347 void SetBorderWidth(i
nt32_t nBorderWidth); | 347 void SetBorderWidth(i
nt32_t nBorderWidth); |
348 void SetClipRect(cons
t CPDF_Rect & rect); | 348 void SetClipRect(cons
t CPDF_Rect & rect); |
349 void SetBorderStyle(i
nt32_t eBorderStyle); | 349 void SetBorderStyle(i
nt32_t eBorderStyle); |
350 void SetBorderDash(co
nst CPWL_Dash & sDash); | 350 void SetBorderDash(co
nst CPWL_Dash & sDash); |
351 | 351 |
352 CPDF_Rect GetOriginWindowR
ect() const; | 352 CPDF_Rect GetOriginWindowR
ect() const; |
353 virtual CPDF_Rect GetWindowRect() const; | 353 virtual CPDF_Rect GetWindowRect() const; |
354 virtual CPDF_Rect GetClientRect() const; | 354 virtual CPDF_Rect GetClientRect() const; |
355 CPDF_Point GetCenterPoint()
const; | 355 CPDF_Point GetCenterPoint()
const; |
356 CPDF_Rect GetClientCenterS
quare() const; | 356 CPDF_Rect GetClientCenterS
quare() const; |
357 CPDF_Rect GetWindowCenterS
quare() const; | 357 CPDF_Rect GetWindowCenterS
quare() const; |
358 int32_t GetBorderWidth() const; | 358 int32_t GetBorderWidth() const; |
359 » FX_BOOL»» » » » » » IsVisible() cons
t {return m_bVisible;} | 359 » bool» » » » » » » IsVisible() cons
t {return m_bVisible;} |
360 » FX_BOOL»» » » » » » HasFlag(FX_DWORD
dwFlags) const; | 360 » bool» » » » » » » HasFlag(FX_DWORD
dwFlags) const; |
361 void AddFlag(FX_DWORD
dwFlags); | 361 void AddFlag(FX_DWORD
dwFlags); |
362 void RemoveFlag(FX_DW
ORD dwFlags); | 362 void RemoveFlag(FX_DW
ORD dwFlags); |
363 CPDF_Rect GetClipRect() co
nst; | 363 CPDF_Rect GetClipRect() co
nst; |
364 CPWL_Wnd* GetParentWindow(
) const; | 364 CPWL_Wnd* GetParentWindow(
) const; |
365 int32_t GetBorderStyle() const; | 365 int32_t GetBorderStyle() const; |
366 CPWL_Dash GetBorderDash()
const; | 366 CPWL_Dash GetBorderDash()
const; |
367 void* GetAttachedData(
) const; | 367 void* GetAttachedData(
) const; |
368 | 368 |
369 » FX_BOOL»» » » » » » WndHitTest(const
CPDF_Point & point) const; | 369 » bool» » » » » » » WndHitTest(const
CPDF_Point & point) const; |
370 » FX_BOOL»» » » » » » ClientHitTest(co
nst CPDF_Point & point) const; | 370 » bool» » » » » » » ClientHitTest(co
nst CPDF_Point & point) const; |
371 » FX_BOOL»» » » » » » IsCaptureMouse()
const; | 371 » bool» » » » » » » IsCaptureMouse()
const; |
372 | 372 |
373 const CPWL_Wnd* GetFocused() const; | 373 const CPWL_Wnd* GetFocused() const; |
374 » FX_BOOL»» » » » » » IsFocused() cons
t; | 374 » bool» » » » » » » IsFocused() cons
t; |
375 » FX_BOOL»» » » » » » IsReadOnly() con
st; | 375 » bool» » » » » » » IsReadOnly() con
st; |
376 CPWL_ScrollBar* GetVScrollBar() const; | 376 CPWL_ScrollBar* GetVScrollBar() const; |
377 | 377 |
378 IFX_Edit_FontMap* GetFontMap() const; | 378 IFX_Edit_FontMap* GetFontMap() const; |
379 IPWL_Provider* GetProvider() const; | 379 IPWL_Provider* GetProvider() const; |
380 virtual IFX_SystemHandler* GetSystemHandler() const; | 380 virtual IFX_SystemHandler* GetSystemHandler() const; |
381 IPWL_FocusHandler* GetFocusHandler() const; | 381 IPWL_FocusHandler* GetFocusHandler() const; |
382 | 382 |
383 int32_t GetTransparency(); | 383 int32_t GetTransparency(); |
384 void SetTransparency(
int32_t nTransparency); | 384 void SetTransparency(
int32_t nTransparency); |
385 | 385 |
386 CPDF_Matrix GetChildToRoot()
const; | 386 CPDF_Matrix GetChildToRoot()
const; |
387 CPDF_Matrix GetChildMatrix()
const; | 387 CPDF_Matrix GetChildMatrix()
const; |
388 void SetChildMatrix(c
onst CPDF_Matrix& mt); | 388 void SetChildMatrix(c
onst CPDF_Matrix& mt); |
389 CPDF_Matrix GetWindowMatrix(
) const; | 389 CPDF_Matrix GetWindowMatrix(
) const; |
390 | 390 |
391 virtual CPDF_Point ChildToParent(const CPDF
_Point& point) const; | 391 virtual CPDF_Point ChildToParent(const CPDF
_Point& point) const; |
392 virtual CPDF_Rect ChildToParent(const CPDF
_Rect& rect) const; | 392 virtual CPDF_Rect ChildToParent(const CPDF
_Rect& rect) const; |
393 virtual CPDF_Point ParentToChild(const CPDF
_Point& point) const; | 393 virtual CPDF_Point ParentToChild(const CPDF
_Point& point) const; |
394 virtual CPDF_Rect ParentToChild(const CPDF
_Rect& rect) const; | 394 virtual CPDF_Rect ParentToChild(const CPDF
_Rect& rect) const; |
395 | 395 |
396 //those methods only implemented by listctrl item | 396 //those methods only implemented by listctrl item |
397 virtual FX_FLOAT GetItemHeight(FX_FLOAT f
LimitWidth) {return 0;} | 397 virtual FX_FLOAT GetItemHeight(FX_FLOAT f
LimitWidth) {return 0;} |
398 virtual FX_FLOAT GetItemLeftMargin() {ret
urn 0;} | 398 virtual FX_FLOAT GetItemLeftMargin() {ret
urn 0;} |
399 virtual FX_FLOAT GetItemRightMargin() {re
turn 0;} | 399 virtual FX_FLOAT GetItemRightMargin() {re
turn 0;} |
400 | 400 |
401 » void» » » » » » » EnableWindow(FX_
BOOL bEnable); | 401 » void» » » » » » » EnableWindow(boo
l bEnable); |
402 » FX_BOOL»» » » » » » IsEnabled(); | 402 » bool» » » » » » » IsEnabled(); |
403 virtual void SetCursor(); | 403 virtual void SetCursor(); |
404 | 404 |
405 protected: | 405 protected: |
406 virtual void CreateChildWnd(const PWL
_CREATEPARAM & cp); | 406 virtual void CreateChildWnd(const PWL
_CREATEPARAM & cp); |
407 virtual void RePosChildWnd(); | 407 virtual void RePosChildWnd(); |
408 void GetAppearanceStr
eam(CFX_ByteTextBuf & sAppStream); | 408 void GetAppearanceStr
eam(CFX_ByteTextBuf & sAppStream); |
409 virtual void GetThisAppearanceStream(
CFX_ByteTextBuf & sAppStream); | 409 virtual void GetThisAppearanceStream(
CFX_ByteTextBuf & sAppStream); |
410 virtual void GetChildAppearanceStream
(CFX_ByteTextBuf & sAppStream); | 410 virtual void GetChildAppearanceStream
(CFX_ByteTextBuf & sAppStream); |
411 | 411 |
412 virtual void DrawThisAppearance(CFX_R
enderDevice* pDevice, CPDF_Matrix* pUser2Device); | 412 virtual void DrawThisAppearance(CFX_R
enderDevice* pDevice, CPDF_Matrix* pUser2Device); |
413 virtual void DrawChildAppearance(CFX_
RenderDevice* pDevice, CPDF_Matrix* pUser2Device); | 413 virtual void DrawChildAppearance(CFX_
RenderDevice* pDevice, CPDF_Matrix* pUser2Device); |
414 | 414 |
415 virtual void OnCreate(PWL_CREATEPARAM
& cp); | 415 virtual void OnCreate(PWL_CREATEPARAM
& cp); |
416 virtual void OnCreated(); | 416 virtual void OnCreated(); |
417 virtual void OnDestroy(); | 417 virtual void OnDestroy(); |
418 | 418 |
419 virtual void OnSetFocus(); | 419 virtual void OnSetFocus(); |
420 virtual void OnKillFocus(); | 420 virtual void OnKillFocus(); |
421 | 421 |
422 virtual void OnEnabled(); | 422 virtual void OnEnabled(); |
423 virtual void OnDisabled(); | 423 virtual void OnDisabled(); |
424 | 424 |
425 » void» » » » » » » SetNotifyFlag(FX
_BOOL bNotifying = TRUE){m_bNotifying = bNotifying;}; | 425 » void» » » » » » » SetNotifyFlag(bo
ol bNotifying = true){m_bNotifying = bNotifying;}; |
426 | 426 |
427 » FX_BOOL»» » » » » » IsValid() const; | 427 » bool» » » » » » » IsValid() const; |
428 PWL_CREATEPARAM GetCreationParam() const
; | 428 PWL_CREATEPARAM GetCreationParam() const
; |
429 » FX_BOOL»» » » » » » IsNotifying() co
nst {return m_bNotifying;} | 429 » bool» » » » » » » IsNotifying() co
nst {return m_bNotifying;} |
430 | 430 |
431 void InvalidateRectMo
ve(const CPDF_Rect & rcOld, const CPDF_Rect & rcNew); | 431 void InvalidateRectMo
ve(const CPDF_Rect & rcOld, const CPDF_Rect & rcNew); |
432 | 432 |
433 void PWLtoWnd(const C
PDF_Point & point, int32_t& x, int32_t& y) const; | 433 void PWLtoWnd(const C
PDF_Point & point, int32_t& x, int32_t& y) const; |
434 FX_RECT PWLtoWnd(const C
PDF_Rect & rect) const; | 434 FX_RECT PWLtoWnd(const C
PDF_Rect & rect) const; |
435 FX_HWND GetAttachedHWnd(
) const; | 435 FX_HWND GetAttachedHWnd(
) const; |
436 | 436 |
437 » FX_BOOL»» » » » » » IsWndCaptureMous
e(const CPWL_Wnd * pWnd) const; | 437 » bool» » » » » » » IsWndCaptureMous
e(const CPWL_Wnd * pWnd) const; |
438 » FX_BOOL»» » » » » » IsWndCaptureKeyb
oard(const CPWL_Wnd * pWnd) const; | 438 » bool» » » » » » » IsWndCaptureKeyb
oard(const CPWL_Wnd * pWnd) const; |
439 const CPWL_Wnd* GetRootWnd() const; | 439 const CPWL_Wnd* GetRootWnd() const; |
440 | 440 |
441 » FX_BOOL»» » » » » » IsCTRLpressed(FX
_DWORD nFlag) const; | 441 » bool» » » » » » » IsCTRLpressed(FX
_DWORD nFlag) const; |
442 » FX_BOOL»» » » » » » IsSHIFTpressed(F
X_DWORD nFlag) const; | 442 » bool» » » » » » » IsSHIFTpressed(F
X_DWORD nFlag) const; |
443 » FX_BOOL»» » » » » » IsALTpressed(FX_
DWORD nFlag) const; | 443 » bool» » » » » » » IsALTpressed(FX_
DWORD nFlag) const; |
444 » FX_BOOL»» » » » » » IsINSERTpressed(
FX_DWORD nFlag) const; | 444 » bool» » » » » » » IsINSERTpressed(
FX_DWORD nFlag) const; |
445 | 445 |
446 private: | 446 private: |
447 void AddChild(CPWL_Wn
d * pWnd); | 447 void AddChild(CPWL_Wn
d * pWnd); |
448 void RemoveChild(CPWL
_Wnd * pWnd); | 448 void RemoveChild(CPWL
_Wnd * pWnd); |
449 | 449 |
450 void CreateScrollBar(
const PWL_CREATEPARAM & cp); | 450 void CreateScrollBar(
const PWL_CREATEPARAM & cp); |
451 void CreateVScrollBar
(const PWL_CREATEPARAM & cp); | 451 void CreateVScrollBar
(const PWL_CREATEPARAM & cp); |
452 | 452 |
453 void AjustStyle(); | 453 void AjustStyle(); |
454 void CreateMsgControl
(); | 454 void CreateMsgControl
(); |
455 void DestroyMsgContro
l(); | 455 void DestroyMsgContro
l(); |
456 | 456 |
457 CPWL_MsgControl* GetMsgControl() const; | 457 CPWL_MsgControl* GetMsgControl() const; |
458 | 458 |
459 protected: | 459 protected: |
460 CFX_ArrayTemplate<CPWL_Wnd*> m_aChildren; | 460 CFX_ArrayTemplate<CPWL_Wnd*> m_aChildren; |
461 | 461 |
462 private: | 462 private: |
463 PWL_CREATEPARAM m_sPrivateParam; | 463 PWL_CREATEPARAM m_sPrivateParam; |
464 | 464 |
465 CPWL_ScrollBar* m_pVScrollBar; | 465 CPWL_ScrollBar* m_pVScrollBar; |
466 | 466 |
467 CPDF_Rect m_rcWindow; | 467 CPDF_Rect m_rcWindow; |
468 CPDF_Rect m_rcClip; | 468 CPDF_Rect m_rcClip; |
469 | 469 |
470 » FX_BOOL»» » » » » » m_bCreated; | 470 » bool» » » » » » » m_bCreated; |
471 » FX_BOOL»» » » » » » m_bVisible; | 471 » bool» » » » » » » m_bVisible; |
472 » FX_BOOL»» » » » » » m_bNotifying; | 472 » bool» » » » » » » m_bNotifying; |
473 » FX_BOOL»» » » » » » m_bEnabled; | 473 » bool» » » » » » » m_bEnabled; |
474 }; | 474 }; |
475 | 475 |
476 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ | 476 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ |
OLD | NEW |