Advertisement
BoneFort

Untitled

Nov 8th, 2023 (edited)
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. //Fl_Canvas.cpp
  2.  
  3. #include <FL/Fl_Box.H>
  4. #include <FL/Fl_Shared_Image.H>
  5. #include <FL/fl_message.H>
  6. #include <string>
  7.  
  8. class Fl_Canvas : public Fl_Box {
  9.     public:
  10.     Fl_Canvas(Fl_Boxtype b, int X, int Y, int W, int H) : Fl_Box(b, X, Y, W, H, "")
  11.     {
  12.     };
  13.  
  14.     void add_image(const char* _image) //Реализация метода
  15.     {
  16.         Fl_Shared_Image* img = Fl_Shared_Image::get(_image);
  17.         image(img);
  18.         fl_message("complite");
  19.         redraw();
  20.     }
  21.  
  22. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement