labelwnd.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef _LABELWND_H
  2. #define _LABELWND_H
  3. #include <bfc/common.h>
  4. #include <api/wnd/wndclass/guiobjwnd.h>
  5. #define LABELWND_PARENT GuiObjectWnd
  6. class LabelWnd : public LABELWND_PARENT {
  7. protected:
  8. LabelWnd();
  9. public:
  10. virtual void getClientRect(RECT *);
  11. virtual int onResize();
  12. virtual int onPaint(Canvas *canvas);
  13. virtual int onGetFocus();
  14. virtual int onKillFocus();
  15. virtual void invalidateLabel();
  16. virtual int wantFocus();
  17. virtual int wantRenderBaseTexture() { return 1; }
  18. // override & return 1 to force painting label with focus all the time
  19. virtual int forceFocus() { return 0; }
  20. virtual void onSetName();
  21. virtual void setMargin(int newmargin);
  22. virtual int setFontSize(int size);
  23. //CUT virtual int childNotify(api_window *child, int msg, intptr_t param1=0, intptr_t param2=0);
  24. int showLabel(int show);
  25. int getLabelHeight();
  26. void reloadResources();
  27. private:
  28. int show_label, labelsize;
  29. int labelHeight;
  30. int margin;
  31. };
  32. // use this if you want a generic labelwnd (but try not to)
  33. class LabelWndI : public LabelWnd { };
  34. #endif