virtualwnd.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #ifndef _VIRTUALWND_H
  2. #define _VIRTUALWND_H
  3. #include <api/wnd/basewnd.h>
  4. #define VIRTUALWND_PARENT BaseWnd
  5. #define AUTOWH 0xFFFE
  6. #define NOCHANGE 0xFFFD
  7. class NOVTABLE VirtualWnd : public VIRTUALWND_PARENT
  8. {
  9. protected:
  10. VirtualWnd();
  11. virtual ~VirtualWnd();
  12. public:
  13. virtual int init( ifc_window *parent, int nochild = FALSE );
  14. virtual int init( OSMODULEHANDLE moduleHandle, OSWINDOWHANDLE parent, int nochild = FALSE );
  15. virtual void bringToFront();
  16. virtual void bringToBack();
  17. virtual void bringAbove( BaseWnd *w );
  18. virtual void bringBelow( BaseWnd *w );
  19. //NONPORTABLE--avoid prolonged use
  20. virtual HWND getOsWindowHandle();
  21. virtual HINSTANCE getOsModuleHandle();
  22. public:
  23. virtual void resize( int x, int y, int w, int h, int wantcb = 1 ) override;
  24. virtual void resize( RECT *r, int wantcb = 1 );
  25. virtual void move( int x, int y ) override;
  26. virtual void invalidate() override;
  27. virtual void invalidateRect( RECT *r ) override;
  28. virtual void invalidateRgn( api_region *reg ) override;
  29. virtual void validate() override;
  30. virtual void validateRect( RECT *r ) override;
  31. virtual void validateRgn( api_region *reg ) override;
  32. virtual void getClientRect( RECT * ) override;
  33. virtual void getNonClientRect( RECT * ) override;
  34. virtual void getWindowRect( RECT * ) override;
  35. virtual int beginCapture() override;
  36. virtual int endCapture() override;
  37. virtual int getCapture() override;
  38. virtual void setVirtualChildCapture( BaseWnd *child );
  39. virtual void repaint() override;
  40. /* virtual int focusNextSibbling(int dochild);
  41. virtual int focusNextVirtualChild(BaseWnd *child);*/
  42. virtual int cascadeRepaint( int pack = 1 ) override;
  43. virtual int cascadeRepaintRect( RECT *r, int pack = 1 ) override;
  44. virtual int cascadeRepaintRgn( api_region *r, int pack = 1 ) override;
  45. virtual ifc_window *rootWndFromPoint( POINT *pt ) override;
  46. virtual double getRenderRatio() override;
  47. virtual int reparent( ifc_window *newparent ) override;
  48. virtual int setVirtual( int i ) override;
  49. virtual ifc_window *getRootParent() override;
  50. virtual int gotFocus() override;
  51. virtual int onGetFocus() override;
  52. virtual int onKillFocus() override;
  53. virtual void setFocus() override;
  54. virtual int onActivate() override;
  55. virtual int onDeactivate() override;
  56. virtual void setVirtualChildFocus( ifc_window *child ) override;
  57. virtual int wantFocus() override
  58. {
  59. return 0;
  60. }
  61. virtual void setAllowDeactivation( int allow ) override;
  62. virtual int allowDeactivation() override;
  63. public:
  64. virtual int isVirtual() override
  65. {
  66. return !bypassvirtual;
  67. }
  68. protected:
  69. int virtualX, virtualY, virtualH, virtualW;
  70. int bypassvirtual;
  71. int focus;
  72. int resizecount;
  73. double lastratio;
  74. };
  75. #endif