gcsx_imgdialog.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* GCSx
  2. ** IMGDIALOG.H
  3. **
  4. ** Image selection dialog (from animgroup/tileset)
  5. ** Not a full dialog- used as a base for others
  6. */
  7. /*****************************************************************************
  8. ** Copyright (C) 2003-2006 Janson
  9. **
  10. ** This program is free software; you can redistribute it and/or modify
  11. ** it under the terms of the GNU General Public License as published by
  12. ** the Free Software Foundation; either version 2 of the License, or
  13. ** (at your option) any later version.
  14. **
  15. ** This program is distributed in the hope that it will be useful,
  16. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. ** GNU General Public License for more details.
  19. **
  20. ** You should have received a copy of the GNU General Public License
  21. ** along with this program; if not, write to the Free Software
  22. ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
  23. *****************************************************************************/
  24. #ifndef __GCSx_IMGDIALOG_H_
  25. #define __GCSx_IMGDIALOG_H_
  26. class ImageDialog : protected Dialog {
  27. protected:
  28. void addLibTree(int id);
  29. void addImgChoose(int id);
  30. // Only world is required
  31. void runPrep(class WorldEdit* nWorld, class AnimGroup* animGroup, class TileSet* tileSet, int animTileId);
  32. // Return values are gaurunteed within ranges/valid
  33. // justchecking = give me the values but don't clean up yet
  34. void runComplete(class AnimGroup** animGroup = NULL, class TileSet** tileSet = NULL, int* animTileId = NULL, int justChecking = 0);
  35. void selectImage(class AnimGroup* animGroup, class TileSet* tileSet, int animTileId);
  36. private:
  37. int animId;
  38. int tileId;
  39. int subId;
  40. class TreeView* libTree;
  41. class ImageChooser* imgChoose;
  42. int libId;
  43. class WorldEdit* world;
  44. void fillLibTree();
  45. static int treeViewWrapTileSet(void* ptr, int code, int command, int check);
  46. int treeViewTileSet(int code, int command, int check);
  47. static int treeViewWrapAnimGroup(void* ptr, int code, int command, int check);
  48. int treeViewAnimGroup(int code, int command, int check);
  49. public:
  50. ImageDialog();
  51. virtual ~ImageDialog();
  52. };
  53. #endif