@CreateMaterials.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /******************************************************************************/
  2. /******************************************************************************/
  3. class CreateMaterials : PropWin
  4. {
  5. class Src
  6. {
  7. Str name, // display name
  8. file; // for files
  9. UID id; // for elements
  10. Src& set(C UID &id );
  11. Src& set(C Str &file);
  12. public:
  13. Src();
  14. };
  15. static int CompareSrcPath(C Src &a, C Src &b);
  16. static int CompareSrcID (C Src &a, C Src &b);
  17. static void Create (CreateMaterials &cm);
  18. void createDo();
  19. static void Process(Src &src, ptr user, int thread_index);
  20. void process(Src &src);
  21. Memc<Src> data;
  22. List<Src> list;
  23. Region region;
  24. Button create_button;
  25. Text text;
  26. Str path, shared_path;
  27. UID parent_id;
  28. SyncLock lock;
  29. void clearProj();
  30. void create();
  31. virtual CreateMaterials& show()override;
  32. virtual void update(C GuiPC &gpc)override;
  33. void drop(C Str &name);
  34. void drop(C MemPtr<Str> &names, GuiObj *obj, C Vec2 &screen_pos);
  35. void drag(C MemPtr<UID> &elms, GuiObj *obj, C Vec2 &screen_pos);
  36. public:
  37. CreateMaterials();
  38. };
  39. /******************************************************************************/
  40. /******************************************************************************/
  41. extern CreateMaterials CreateMtrls;
  42. /******************************************************************************/