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 #include "xfa/fwl/core/ifwl_widget.h" | 7 #include "xfa/fwl/core/ifwl_widget.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 IFWL_Widget::~IFWL_Widget() { | 54 IFWL_Widget::~IFWL_Widget() { |
55 NotifyDriver(); | 55 NotifyDriver(); |
56 m_pWidgetMgr->RemoveWidget(this); | 56 m_pWidgetMgr->RemoveWidget(this); |
57 } | 57 } |
58 | 58 |
59 bool IFWL_Widget::IsInstance(const CFX_WideStringC& wsClass) const { | 59 bool IFWL_Widget::IsInstance(const CFX_WideStringC& wsClass) const { |
60 return false; | 60 return false; |
61 } | 61 } |
62 | 62 |
63 void IFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { | 63 void IFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { |
64 if (bAutoSize) { | 64 if (!bAutoSize) { |
65 if (HasEdge()) { | |
66 FX_FLOAT fEdge = GetEdgeWidth(); | |
67 rect.Inflate(fEdge, fEdge); | |
68 } | |
69 if (HasBorder()) { | |
70 FX_FLOAT fBorder = GetBorderSize(); | |
71 rect.Inflate(fBorder, fBorder); | |
72 } | |
73 } else { | |
74 rect = m_pProperties->m_rtWidget; | 65 rect = m_pProperties->m_rtWidget; |
| 66 return; |
| 67 } |
| 68 |
| 69 if (HasEdge()) { |
| 70 FX_FLOAT fEdge = GetEdgeWidth(); |
| 71 rect.Inflate(fEdge, fEdge); |
| 72 } |
| 73 if (HasBorder()) { |
| 74 FX_FLOAT fBorder = GetBorderSize(); |
| 75 rect.Inflate(fBorder, fBorder); |
75 } | 76 } |
76 } | 77 } |
77 | 78 |
78 void IFWL_Widget::SetWidgetRect(const CFX_RectF& rect) { | 79 void IFWL_Widget::SetWidgetRect(const CFX_RectF& rect) { |
79 CFX_RectF rtOld = m_pProperties->m_rtWidget; | 80 CFX_RectF rtOld = m_pProperties->m_rtWidget; |
80 m_pProperties->m_rtWidget = rect; | 81 m_pProperties->m_rtWidget = rect; |
81 if (IsChild()) { | 82 if (IsChild()) { |
82 if (FXSYS_fabs(rtOld.width - rect.width) > 0.5f || | 83 if (FXSYS_fabs(rtOld.width - rect.width) > 0.5f || |
83 FXSYS_fabs(rtOld.height - rect.height) > 0.5f) { | 84 FXSYS_fabs(rtOld.height - rect.height) > 0.5f) { |
84 CFWL_EvtSizeChanged ev; | 85 CFWL_EvtSizeChanged ev; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 m1.TransformPoint(fx, fy); | 227 m1.TransformPoint(fx, fy); |
227 pWidget->GetWidgetRect(r); | 228 pWidget->GetWidgetRect(r); |
228 fx -= r.left; | 229 fx -= r.left; |
229 fy -= r.top; | 230 fy -= r.top; |
230 } | 231 } |
231 } | 232 } |
232 | 233 |
233 void IFWL_Widget::GetMatrix(CFX_Matrix& matrix, bool bGlobal) { | 234 void IFWL_Widget::GetMatrix(CFX_Matrix& matrix, bool bGlobal) { |
234 if (!m_pProperties) | 235 if (!m_pProperties) |
235 return; | 236 return; |
236 if (bGlobal) { | 237 if (!bGlobal) { |
237 IFWL_Widget* parent = GetParent(); | |
238 CFX_ArrayTemplate<IFWL_Widget*> parents; | |
239 while (parent) { | |
240 parents.Add(parent); | |
241 parent = parent->GetParent(); | |
242 } | |
243 matrix.SetIdentity(); | 238 matrix.SetIdentity(); |
244 CFX_Matrix ctmOnParent; | 239 return; |
245 CFX_RectF rect; | |
246 int32_t count = parents.GetSize(); | |
247 for (int32_t i = count - 2; i >= 0; i--) { | |
248 parent = parents.GetAt(i); | |
249 parent->GetMatrix(ctmOnParent, false); | |
250 parent->GetWidgetRect(rect); | |
251 matrix.Concat(ctmOnParent, true); | |
252 matrix.Translate(rect.left, rect.top, true); | |
253 } | |
254 CFX_Matrix m; | |
255 m.SetIdentity(); | |
256 matrix.Concat(m, true); | |
257 parents.RemoveAll(); | |
258 } else { | |
259 matrix.SetIdentity(); | |
260 } | 240 } |
| 241 |
| 242 IFWL_Widget* parent = GetParent(); |
| 243 CFX_ArrayTemplate<IFWL_Widget*> parents; |
| 244 while (parent) { |
| 245 parents.Add(parent); |
| 246 parent = parent->GetParent(); |
| 247 } |
| 248 matrix.SetIdentity(); |
| 249 CFX_Matrix ctmOnParent; |
| 250 CFX_RectF rect; |
| 251 int32_t count = parents.GetSize(); |
| 252 for (int32_t i = count - 2; i >= 0; i--) { |
| 253 parent = parents.GetAt(i); |
| 254 parent->GetMatrix(ctmOnParent, false); |
| 255 parent->GetWidgetRect(rect); |
| 256 matrix.Concat(ctmOnParent, true); |
| 257 matrix.Translate(rect.left, rect.top, true); |
| 258 } |
| 259 CFX_Matrix m; |
| 260 m.SetIdentity(); |
| 261 matrix.Concat(m, true); |
| 262 parents.RemoveAll(); |
261 } | 263 } |
262 | 264 |
263 void IFWL_Widget::DrawWidget(CFX_Graphics* pGraphics, | 265 void IFWL_Widget::DrawWidget(CFX_Graphics* pGraphics, |
264 const CFX_Matrix* pMatrix) {} | 266 const CFX_Matrix* pMatrix) {} |
265 | 267 |
266 void IFWL_Widget::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { | 268 void IFWL_Widget::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { |
267 m_pProperties->m_pThemeProvider = pThemeProvider; | 269 m_pProperties->m_pThemeProvider = pThemeProvider; |
268 } | 270 } |
269 | 271 |
270 void IFWL_Widget::GetEdgeRect(CFX_RectF& rtEdge) { | 272 void IFWL_Widget::GetEdgeRect(CFX_RectF& rtEdge) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 312 |
311 void IFWL_Widget::GetRelativeRect(CFX_RectF& rect) { | 313 void IFWL_Widget::GetRelativeRect(CFX_RectF& rect) { |
312 rect = m_pProperties->m_rtWidget; | 314 rect = m_pProperties->m_rtWidget; |
313 rect.left = rect.top = 0; | 315 rect.left = rect.top = 0; |
314 } | 316 } |
315 | 317 |
316 void* IFWL_Widget::GetThemeCapacity(CFWL_WidgetCapacity dwCapacity) { | 318 void* IFWL_Widget::GetThemeCapacity(CFWL_WidgetCapacity dwCapacity) { |
317 IFWL_ThemeProvider* pTheme = GetAvailableTheme(); | 319 IFWL_ThemeProvider* pTheme = GetAvailableTheme(); |
318 if (!pTheme) | 320 if (!pTheme) |
319 return nullptr; | 321 return nullptr; |
| 322 |
320 CFWL_ThemePart part; | 323 CFWL_ThemePart part; |
321 part.m_pWidget = this; | 324 part.m_pWidget = this; |
322 return pTheme->GetCapacity(&part, dwCapacity); | 325 return pTheme->GetCapacity(&part, dwCapacity); |
323 } | 326 } |
324 | 327 |
325 IFWL_ThemeProvider* IFWL_Widget::GetAvailableTheme() { | 328 IFWL_ThemeProvider* IFWL_Widget::GetAvailableTheme() { |
326 if (m_pProperties->m_pThemeProvider) { | 329 if (m_pProperties->m_pThemeProvider) |
327 return m_pProperties->m_pThemeProvider; | 330 return m_pProperties->m_pThemeProvider; |
328 } | 331 |
329 IFWL_Widget* pUp = this; | 332 IFWL_Widget* pUp = this; |
330 do { | 333 do { |
331 pUp = (pUp->GetStyles() & FWL_WGTSTYLE_Popup) | 334 pUp = (pUp->GetStyles() & FWL_WGTSTYLE_Popup) |
332 ? m_pWidgetMgr->GetOwnerWidget(pUp) | 335 ? m_pWidgetMgr->GetOwnerWidget(pUp) |
333 : m_pWidgetMgr->GetParentWidget(pUp); | 336 : m_pWidgetMgr->GetParentWidget(pUp); |
334 if (pUp) { | 337 if (pUp) { |
335 IFWL_ThemeProvider* pRet = pUp->GetThemeProvider(); | 338 IFWL_ThemeProvider* pRet = pUp->GetThemeProvider(); |
336 if (pRet) | 339 if (pRet) |
337 return pRet; | 340 return pRet; |
338 } | 341 } |
339 } while (pUp); | 342 } while (pUp); |
340 return nullptr; | 343 return nullptr; |
341 } | 344 } |
342 | 345 |
343 IFWL_Widget* IFWL_Widget::GetRootOuter() { | 346 IFWL_Widget* IFWL_Widget::GetRootOuter() { |
344 IFWL_Widget* pRet = m_pOuter; | 347 IFWL_Widget* pRet = m_pOuter; |
345 if (!pRet) | 348 if (!pRet) |
346 return nullptr; | 349 return nullptr; |
347 while (IFWL_Widget* pOuter = pRet->GetOuter()) { | 350 |
| 351 while (IFWL_Widget* pOuter = pRet->GetOuter()) |
348 pRet = pOuter; | 352 pRet = pOuter; |
349 } | |
350 return pRet; | 353 return pRet; |
351 } | 354 } |
352 | 355 |
353 CFX_SizeF IFWL_Widget::CalcTextSize(const CFX_WideString& wsText, | 356 CFX_SizeF IFWL_Widget::CalcTextSize(const CFX_WideString& wsText, |
354 IFWL_ThemeProvider* pTheme, | 357 IFWL_ThemeProvider* pTheme, |
355 bool bMultiLine, | 358 bool bMultiLine, |
356 int32_t iLineWidth) { | 359 int32_t iLineWidth) { |
357 if (!pTheme) | 360 if (!pTheme) |
358 return CFX_SizeF(); | 361 return CFX_SizeF(); |
359 | 362 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 const IFWL_App* pApp = GetOwnerApp(); | 396 const IFWL_App* pApp = GetOwnerApp(); |
394 if (!pApp) | 397 if (!pApp) |
395 return; | 398 return; |
396 | 399 |
397 CFWL_NoteDriver* pDriver = | 400 CFWL_NoteDriver* pDriver = |
398 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); | 401 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); |
399 if (!pDriver) | 402 if (!pDriver) |
400 return; | 403 return; |
401 | 404 |
402 IFWL_Widget* curFocus = pDriver->GetFocus(); | 405 IFWL_Widget* curFocus = pDriver->GetFocus(); |
403 if (bFocus && curFocus != this) { | 406 if (bFocus && curFocus != this) |
404 pDriver->SetFocus(this); | 407 pDriver->SetFocus(this); |
405 } else if (!bFocus && curFocus == this) { | 408 else if (!bFocus && curFocus == this) |
406 pDriver->SetFocus(nullptr); | 409 pDriver->SetFocus(nullptr); |
407 } | |
408 } | 410 } |
409 | 411 |
410 void IFWL_Widget::SetGrab(bool bSet) { | 412 void IFWL_Widget::SetGrab(bool bSet) { |
411 const IFWL_App* pApp = GetOwnerApp(); | 413 const IFWL_App* pApp = GetOwnerApp(); |
412 if (!pApp) | 414 if (!pApp) |
413 return; | 415 return; |
| 416 |
414 CFWL_NoteDriver* pDriver = | 417 CFWL_NoteDriver* pDriver = |
415 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); | 418 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); |
416 pDriver->SetGrab(this, bSet); | 419 pDriver->SetGrab(this, bSet); |
417 } | 420 } |
418 | 421 |
419 void IFWL_Widget::GetPopupPos(FX_FLOAT fMinHeight, | 422 void IFWL_Widget::GetPopupPos(FX_FLOAT fMinHeight, |
420 FX_FLOAT fMaxHeight, | 423 FX_FLOAT fMaxHeight, |
421 const CFX_RectF& rtAnchor, | 424 const CFX_RectF& rtAnchor, |
422 CFX_RectF& rtPopup) { | 425 CFX_RectF& rtPopup) { |
423 if (GetClassID() == FWL_Type::ComboBox) { | 426 if (GetClassID() == FWL_Type::ComboBox) { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 } | 475 } |
473 | 476 |
474 bool IFWL_Widget::GetPopupPosComboBox(FX_FLOAT fMinHeight, | 477 bool IFWL_Widget::GetPopupPosComboBox(FX_FLOAT fMinHeight, |
475 FX_FLOAT fMaxHeight, | 478 FX_FLOAT fMaxHeight, |
476 const CFX_RectF& rtAnchor, | 479 const CFX_RectF& rtAnchor, |
477 CFX_RectF& rtPopup) { | 480 CFX_RectF& rtPopup) { |
478 FX_FLOAT fx = 0; | 481 FX_FLOAT fx = 0; |
479 FX_FLOAT fy = 0; | 482 FX_FLOAT fy = 0; |
480 | 483 |
481 FX_FLOAT fPopHeight = rtPopup.height; | 484 FX_FLOAT fPopHeight = rtPopup.height; |
482 if (rtPopup.height > fMaxHeight) { | 485 if (rtPopup.height > fMaxHeight) |
483 fPopHeight = fMaxHeight; | 486 fPopHeight = fMaxHeight; |
484 } else if (rtPopup.height < fMinHeight) { | 487 else if (rtPopup.height < fMinHeight) |
485 fPopHeight = fMinHeight; | 488 fPopHeight = fMinHeight; |
486 } | 489 |
487 FX_FLOAT fWidth = std::max(rtAnchor.width, rtPopup.width); | 490 FX_FLOAT fWidth = std::max(rtAnchor.width, rtPopup.width); |
488 FX_FLOAT fBottom = rtAnchor.bottom() + fPopHeight; | 491 FX_FLOAT fBottom = rtAnchor.bottom() + fPopHeight; |
489 TransformTo(nullptr, fx, fy); | 492 TransformTo(nullptr, fx, fy); |
490 if (fBottom + fy > 0.0f) { | 493 if (fBottom + fy > 0.0f) |
491 rtPopup.Set(rtAnchor.left, rtAnchor.top - fPopHeight, fWidth, fPopHeight); | 494 rtPopup.Set(rtAnchor.left, rtAnchor.top - fPopHeight, fWidth, fPopHeight); |
492 } else { | 495 else |
493 rtPopup.Set(rtAnchor.left, rtAnchor.bottom(), fWidth, fPopHeight); | 496 rtPopup.Set(rtAnchor.left, rtAnchor.bottom(), fWidth, fPopHeight); |
494 } | 497 |
495 rtPopup.Offset(fx, fy); | 498 rtPopup.Offset(fx, fy); |
496 return true; | 499 return true; |
497 } | 500 } |
498 | 501 |
499 bool IFWL_Widget::GetPopupPosGeneral(FX_FLOAT fMinHeight, | 502 bool IFWL_Widget::GetPopupPosGeneral(FX_FLOAT fMinHeight, |
500 FX_FLOAT fMaxHeight, | 503 FX_FLOAT fMaxHeight, |
501 const CFX_RectF& rtAnchor, | 504 const CFX_RectF& rtAnchor, |
502 CFX_RectF& rtPopup) { | 505 CFX_RectF& rtPopup) { |
503 FX_FLOAT fx = 0; | 506 FX_FLOAT fx = 0; |
504 FX_FLOAT fy = 0; | 507 FX_FLOAT fy = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 CFWL_NoteDriver* pNoteDriver = pApp->GetNoteDriver(); | 539 CFWL_NoteDriver* pNoteDriver = pApp->GetNoteDriver(); |
537 if (!pNoteDriver) | 540 if (!pNoteDriver) |
538 return; | 541 return; |
539 | 542 |
540 pNoteDriver->UnregisterEventTarget(this); | 543 pNoteDriver->UnregisterEventTarget(this); |
541 } | 544 } |
542 | 545 |
543 void IFWL_Widget::DispatchKeyEvent(CFWL_MsgKey* pNote) { | 546 void IFWL_Widget::DispatchKeyEvent(CFWL_MsgKey* pNote) { |
544 if (!pNote) | 547 if (!pNote) |
545 return; | 548 return; |
| 549 |
546 CFWL_EvtKey* pEvent = new CFWL_EvtKey; | 550 CFWL_EvtKey* pEvent = new CFWL_EvtKey; |
547 pEvent->m_pSrcTarget = this; | 551 pEvent->m_pSrcTarget = this; |
548 pEvent->m_dwCmd = pNote->m_dwCmd; | 552 pEvent->m_dwCmd = pNote->m_dwCmd; |
549 pEvent->m_dwKeyCode = pNote->m_dwKeyCode; | 553 pEvent->m_dwKeyCode = pNote->m_dwKeyCode; |
550 pEvent->m_dwFlags = pNote->m_dwFlags; | 554 pEvent->m_dwFlags = pNote->m_dwFlags; |
551 DispatchEvent(pEvent); | 555 DispatchEvent(pEvent); |
552 pEvent->Release(); | 556 pEvent->Release(); |
553 } | 557 } |
554 | 558 |
555 void IFWL_Widget::DispatchEvent(CFWL_Event* pEvent) { | 559 void IFWL_Widget::DispatchEvent(CFWL_Event* pEvent) { |
556 if (m_pOuter) { | 560 if (m_pOuter) { |
557 m_pOuter->GetDelegate()->OnProcessEvent(pEvent); | 561 m_pOuter->GetDelegate()->OnProcessEvent(pEvent); |
558 return; | 562 return; |
559 } | 563 } |
560 const IFWL_App* pApp = GetOwnerApp(); | 564 const IFWL_App* pApp = GetOwnerApp(); |
561 if (!pApp) | 565 if (!pApp) |
562 return; | 566 return; |
| 567 |
563 CFWL_NoteDriver* pNoteDriver = pApp->GetNoteDriver(); | 568 CFWL_NoteDriver* pNoteDriver = pApp->GetNoteDriver(); |
564 if (!pNoteDriver) | 569 if (!pNoteDriver) |
565 return; | 570 return; |
566 pNoteDriver->SendEvent(pEvent); | 571 pNoteDriver->SendEvent(pEvent); |
567 } | 572 } |
568 | 573 |
569 void IFWL_Widget::Repaint(const CFX_RectF* pRect) { | 574 void IFWL_Widget::Repaint(const CFX_RectF* pRect) { |
570 if (pRect) { | 575 if (pRect) { |
571 m_pWidgetMgr->RepaintWidget(this, pRect); | 576 m_pWidgetMgr->RepaintWidget(this, pRect); |
572 return; | 577 return; |
573 } | 578 } |
574 CFX_RectF rect; | 579 CFX_RectF rect; |
575 rect = m_pProperties->m_rtWidget; | 580 rect = m_pProperties->m_rtWidget; |
576 rect.left = rect.top = 0; | 581 rect.left = rect.top = 0; |
577 m_pWidgetMgr->RepaintWidget(this, &rect); | 582 m_pWidgetMgr->RepaintWidget(this, &rect); |
578 } | 583 } |
579 | 584 |
580 void IFWL_Widget::DrawBackground(CFX_Graphics* pGraphics, | 585 void IFWL_Widget::DrawBackground(CFX_Graphics* pGraphics, |
581 CFWL_Part iPartBk, | 586 CFWL_Part iPartBk, |
582 IFWL_ThemeProvider* pTheme, | 587 IFWL_ThemeProvider* pTheme, |
583 const CFX_Matrix* pMatrix) { | 588 const CFX_Matrix* pMatrix) { |
584 CFX_RectF rtRelative; | 589 CFX_RectF rtRelative; |
585 GetRelativeRect(rtRelative); | 590 GetRelativeRect(rtRelative); |
586 CFWL_ThemeBackground param; | 591 CFWL_ThemeBackground param; |
587 param.m_pWidget = this; | 592 param.m_pWidget = this; |
588 param.m_iPart = iPartBk; | 593 param.m_iPart = iPartBk; |
589 param.m_pGraphics = pGraphics; | 594 param.m_pGraphics = pGraphics; |
590 if (pMatrix) { | 595 if (pMatrix) |
591 param.m_matrix.Concat(*pMatrix, true); | 596 param.m_matrix.Concat(*pMatrix, true); |
592 } | |
593 param.m_rtPart = rtRelative; | 597 param.m_rtPart = rtRelative; |
594 pTheme->DrawBackground(¶m); | 598 pTheme->DrawBackground(¶m); |
595 } | 599 } |
596 | 600 |
597 void IFWL_Widget::DrawBorder(CFX_Graphics* pGraphics, | 601 void IFWL_Widget::DrawBorder(CFX_Graphics* pGraphics, |
598 CFWL_Part iPartBorder, | 602 CFWL_Part iPartBorder, |
599 IFWL_ThemeProvider* pTheme, | 603 IFWL_ThemeProvider* pTheme, |
600 const CFX_Matrix* pMatrix) { | 604 const CFX_Matrix* pMatrix) { |
601 CFX_RectF rtRelative; | 605 CFX_RectF rtRelative; |
602 GetRelativeRect(rtRelative); | 606 GetRelativeRect(rtRelative); |
603 CFWL_ThemeBackground param; | 607 CFWL_ThemeBackground param; |
604 param.m_pWidget = this; | 608 param.m_pWidget = this; |
605 param.m_iPart = iPartBorder; | 609 param.m_iPart = iPartBorder; |
606 param.m_pGraphics = pGraphics; | 610 param.m_pGraphics = pGraphics; |
607 if (pMatrix) { | 611 if (pMatrix) |
608 param.m_matrix.Concat(*pMatrix, true); | 612 param.m_matrix.Concat(*pMatrix, true); |
609 } | |
610 param.m_rtPart = rtRelative; | 613 param.m_rtPart = rtRelative; |
611 pTheme->DrawBackground(¶m); | 614 pTheme->DrawBackground(¶m); |
612 } | 615 } |
613 | 616 |
614 void IFWL_Widget::DrawEdge(CFX_Graphics* pGraphics, | 617 void IFWL_Widget::DrawEdge(CFX_Graphics* pGraphics, |
615 CFWL_Part iPartEdge, | 618 CFWL_Part iPartEdge, |
616 IFWL_ThemeProvider* pTheme, | 619 IFWL_ThemeProvider* pTheme, |
617 const CFX_Matrix* pMatrix) { | 620 const CFX_Matrix* pMatrix) { |
618 CFX_RectF rtEdge; | 621 CFX_RectF rtEdge; |
619 GetEdgeRect(rtEdge); | 622 GetEdgeRect(rtEdge); |
620 CFWL_ThemeBackground param; | 623 CFWL_ThemeBackground param; |
621 param.m_pWidget = this; | 624 param.m_pWidget = this; |
622 param.m_iPart = iPartEdge; | 625 param.m_iPart = iPartEdge; |
623 param.m_pGraphics = pGraphics; | 626 param.m_pGraphics = pGraphics; |
624 if (pMatrix) { | 627 if (pMatrix) |
625 param.m_matrix.Concat(*pMatrix, true); | 628 param.m_matrix.Concat(*pMatrix, true); |
626 } | |
627 param.m_rtPart = rtEdge; | 629 param.m_rtPart = rtEdge; |
628 pTheme->DrawBackground(¶m); | 630 pTheme->DrawBackground(¶m); |
629 } | 631 } |
630 | 632 |
631 void IFWL_Widget::NotifyDriver() { | 633 void IFWL_Widget::NotifyDriver() { |
632 const IFWL_App* pApp = GetOwnerApp(); | 634 const IFWL_App* pApp = GetOwnerApp(); |
633 if (!pApp) | 635 if (!pApp) |
634 return; | 636 return; |
635 | 637 |
636 CFWL_NoteDriver* pDriver = | 638 CFWL_NoteDriver* pDriver = |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 } | 739 } |
738 default: | 740 default: |
739 break; | 741 break; |
740 } | 742 } |
741 } | 743 } |
742 | 744 |
743 void IFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} | 745 void IFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} |
744 | 746 |
745 void IFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, | 747 void IFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, |
746 const CFX_Matrix* pMatrix) {} | 748 const CFX_Matrix* pMatrix) {} |
OLD | NEW |