Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

116 lines
2.9 KiB

  1. //
  2. // This is the header file of softkbd window ui.
  3. //
  4. #ifndef SOFTKBDUI_H
  5. #define SOFTKBDUI_H
  6. #include "private.h"
  7. #include "globals.h"
  8. #include "Softkbdc.h"
  9. #include "cuiwnd.h"
  10. class CSoftkbdUIWnd;
  11. class CTitleUIGripper : public CUIFGripper
  12. {
  13. public:
  14. CTitleUIGripper( CUIFObject *pParent, const RECT *prc ) : CUIFGripper(pParent,prc) {};
  15. virtual void OnPaint(HDC hDC);
  16. virtual void OnLButtonUp( POINT pt );
  17. };
  18. class CSoftkbdButton : public CUIFButton2
  19. {
  20. public:
  21. CSoftkbdButton(CUIFObject *pParent, DWORD dwID, const RECT *prc, DWORD dwStyle, KEYID keyId);
  22. virtual ~CSoftkbdButton( void );
  23. HRESULT SetSoftkbdBtnBitmap(HINSTANCE hResDll, WCHAR * wszBitmapStr );
  24. KEYID GetKeyId( ) { return m_keyId; }
  25. HRESULT ReleaseButtonResouce( );
  26. private:
  27. KEYID m_keyId;
  28. };
  29. class CStaticBitmap : public CUIFObject
  30. {
  31. public:
  32. CStaticBitmap(CUIFObject *pParent, DWORD dwID, const RECT *prc, DWORD dwStyle);
  33. virtual ~CStaticBitmap( void );
  34. HRESULT SetStaticBitmap(HINSTANCE hResDll, WCHAR * wszBitmapStr );
  35. virtual void OnPaint( HDC hDC );
  36. private:
  37. HBITMAP m_hBmp;
  38. HBITMAP m_hBmpMask;
  39. };
  40. class CTitleBarUIObj : public CUIFObject
  41. {
  42. public:
  43. CTitleBarUIObj(CUIFObject *pWndFrame, const RECT *prc, TITLEBAR_TYPE TitleBar_Type);
  44. virtual ~CTitleBarUIObj();
  45. HRESULT _Init(WORD wIconId, WORD wCloseId);
  46. private:
  47. CStaticBitmap *m_pIconButton;
  48. CSoftkbdButton *m_pCloseButton;
  49. TITLEBAR_TYPE m_TitlebarType;
  50. };
  51. class CSoftkbdUIWnd : public CUIFWindow
  52. {
  53. public:
  54. CSoftkbdUIWnd(CSoftKbd *pSoftKbd, HINSTANCE hInst,UINT uiWindowStyle=UIWINDOW_TOPMOST | UIWINDOW_TOOLWINDOW | UIWINDOW_WSDLGFRAME);
  55. ~CSoftkbdUIWnd( );
  56. void Show( INT iShow );
  57. LPCTSTR GetClassName( void ) {
  58. return c_szSoftKbdUIWndClassName;
  59. }
  60. LRESULT OnObjectNotify(CUIFObject * pUIObj, DWORD dwCode, LPARAM lParam);
  61. HWND _CreateSoftkbdWindow(HWND hOwner, TITLEBAR_TYPE Titlebar_type, INT xPos, INT yPos, INT width, INT height);
  62. HRESULT _GenerateWindowLayout( );
  63. HRESULT _SetKeyLabel( );
  64. INT _GetAlphaSetFromReg( );
  65. HRESULT _OnWindowMove( );
  66. void SetAlpha(INT bAlpha);
  67. void HandleMouseMsg( UINT uMsg, POINT pt );
  68. void OnMouseOutFromWindow( POINT pt );
  69. void UpdateFont( LOGFONTW *plfFont );
  70. virtual CUIFObject *Initialize( void );
  71. private:
  72. CSoftKbd *m_pSoftKbd;
  73. CTitleBarUIObj *m_TitleBar;
  74. HFONT m_hUserTextFont; // text font set by user.
  75. // if user doesn't set text font, this member should be NULL, and DEFAULT_GUI_FONT
  76. // will be used.
  77. TITLEBAR_TYPE m_Titlebar_Type;
  78. INT m_bAlpha;
  79. BOOL m_fShowAlphaBlend;
  80. INT m_bAlphaSet;
  81. };
  82. #endif /* SOFTKBDUI_H */