@BrushClass.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /******************************************************************************/
  2. /******************************************************************************/
  3. class BrushClass : Window // Brush (Size + Speed + Soft + Image)
  4. {
  5. class Slope : GuiCustom
  6. {
  7. static flt SlopeF (flt step );
  8. static flt SlopeX (flt x, C Rect &rect);
  9. static flt SlopeY (flt y, C Rect &rect);
  10. static void PushedSide(Slope &slope );
  11. flt val ;
  12. bool side;
  13. Button side_b;
  14. flt cos()C;
  15. virtual void update(C GuiPC &gpc)override;
  16. virtual void draw(C GuiPC &gpc)override;
  17. public:
  18. Slope();
  19. };
  20. bool alt_rotate;
  21. TextBlack ts;
  22. Window slope_window, image_window;
  23. Button bsize;
  24. Text tsize, tspeed, tsoft, tangle;
  25. Slider ssize, sspeed, ssoft, sangle;
  26. ComboBox cpattern;
  27. Tabs shape;
  28. Button slope_b, image, pattern;
  29. ImageSkin image_image;
  30. WindowIO image_io;
  31. flt rotate_cos, rotate_sin, rotate_scale, pattern_scale;
  32. Image image_sw, image_hw;
  33. Str image_name;
  34. Slope slope;
  35. static void SetImage (C Str &file, BrushClass &brush);
  36. static void ImageWindow( BrushClass &brush);
  37. static void SlopeWindow( BrushClass &brush);
  38. static cchar8 *PatternText[]
  39. ;
  40. // manage
  41. BrushClass& create(GuiObj &parent, C Vec2 &rd);
  42. // operations
  43. void setImage(C Str &name);
  44. void setChildWindows();
  45. virtual Window& hide()override;
  46. virtual Window& show()override;
  47. virtual bool hasMsWheelFocus()C;
  48. virtual void update(C GuiPC &gpc)override;
  49. void drop(Memc<Str> &names, GuiObj *focus_obj, C Vec2 &screen_pos);
  50. public:
  51. BrushClass();
  52. };
  53. /******************************************************************************/
  54. /******************************************************************************/
  55. /******************************************************************************/