1
0

toolbarAddress.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef NULLSOFT_WINAMP_OMBROWSER_TOOLBAR_ADDRESS_HEADER
  2. #define NULLSOFT_WINAMP_OMBROWSER_TOOLBAR_ADDRESS_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./toolbarItem.h"
  7. #include "./toolbarEditbox.h"
  8. class ToolbarAddress : public ToolbarItem, public ToolbarEditboxHost
  9. {
  10. public:
  11. typedef enum
  12. {
  13. styleAddressReadonly = 0x00010000,
  14. styleAddressShowReal = 0x00020000,
  15. } addressStyles;
  16. protected:
  17. ToolbarAddress(LPCSTR pszName, UINT nStyle);
  18. ~ToolbarAddress();
  19. public:
  20. static ToolbarItem* CALLBACK CreateInstance(ToolbarItem::Template *itemTemplate);
  21. public:
  22. BOOL AdjustRect(HWND hToolbar, RECT *proposedRect);
  23. BOOL Paint(HWND hToolbar, HDC hdc, const RECT *paintRect, UINT state);
  24. INT GetTip(LPTSTR pszBuffer, INT cchBufferMax);
  25. BOOL SetDescription(HWND hToolbar, LPCWSTR pszDescription);
  26. BOOL SetRect(const RECT *prc);
  27. BOOL SetRectEmpty();
  28. UINT GetStyle();
  29. void SetStyle(HWND hToolbar, UINT newStyle, UINT styleMask);
  30. HRESULT GetText(LPWSTR pszBuffer, UINT cchBufferMax);
  31. HRESULT GetTextLength(size_t *pcchLength);
  32. void MouseMove(HWND hToolbar, UINT mouseFlags, POINT pt);
  33. void MouseLeave(HWND hToolbar);
  34. void LButtonDown(HWND hToolbar, UINT mouseFlags, POINT pt);
  35. void SetFocus(HWND hToolbar, ToolbarItem *focusItem, BOOL fSet);
  36. BOOL SetCursor(HWND hToolbar, HWND hCursor, UINT hitTest, UINT messageId);
  37. void UpdateSkin(HWND hToolbar);
  38. BOOL FillMenuInfo(HWND hToolbar, MENUITEMINFO *pmii, LPWSTR pszBuffer, INT cchBufferMax);
  39. void CommandSent(HWND hToolbar, INT commandId);
  40. BOOL SetValueStr(HWND hToolbar, LPCWSTR value);
  41. BOOL DisplayContextMenu(HWND hToolbar, INT x, INT y);
  42. //ToolbarEditboxHost
  43. void EditboxDestroyed(HWND hwnd);
  44. BOOL EditboxKillFocus(HWND hwnd, HWND hFocus);
  45. void EditboxResetText(HWND hwnd);
  46. void EditboxNavigateNextCtrl(HWND hwnd, BOOL fForward);
  47. void EditboxAcceptText(HWND hwnd);
  48. BOOL EditboxKeyDown(HWND hwnd, UINT vKey, UINT state);
  49. BOOL EditboxKeyUp(HWND hwnd, UINT vKey, UINT state);
  50. BOOL EditboxPreviewChar(HWND hwnd, UINT vKey, UINT state);
  51. protected:
  52. BOOL ActivateEditor(HWND hToolbar, const POINT *ppt);
  53. BOOL SetClipboardText(HWND hToolbar, LPCWSTR pszText);
  54. protected:
  55. UINT minWidth;
  56. HBITMAP bitmap;
  57. INT iconHeight;
  58. INT iconWidth;
  59. INT textHeight;
  60. INT textMargin;
  61. COLORREF rgbText;
  62. COLORREF rgbBk;
  63. HWND hEditor;
  64. };
  65. #endif //NULLSOFT_WINAMP_OMBROWSER_TOOLBAR_STATIC_HEADER