gcsx_layerprop.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* GCSx
  2. ** LAYERPROP.H
  3. **
  4. ** Layer properties dialog
  5. */
  6. /*****************************************************************************
  7. ** Copyright (C) 2003-2006 Janson
  8. **
  9. ** This program is free software; you can redistribute it and/or modify
  10. ** it under the terms of the GNU General Public License as published by
  11. ** the Free Software Foundation; either version 2 of the License, or
  12. ** (at your option) any later version.
  13. **
  14. ** This program is distributed in the hope that it will be useful,
  15. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ** GNU General Public License for more details.
  18. **
  19. ** You should have received a copy of the GNU General Public License
  20. ** along with this program; if not, write to the Free Software
  21. ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
  22. *****************************************************************************/
  23. #ifndef __GCSx_LAYERPROP_H_
  24. #define __GCSx_LAYERPROP_H_
  25. // This radio modifies other controls according to state
  26. // It's actions are specific to this properties dialog
  27. class LayerPropertiesRadioButton : public WRadioButton {
  28. public:
  29. LayerPropertiesRadioButton(int rId, const std::string& rLabel, int* rSetting, int rValue);
  30. int state(int checked = -1, int fromLoad = 0);
  31. };
  32. class LayerPropertiesDialog : private Dialog {
  33. public:
  34. enum {
  35. ID_LABEL = 1,
  36. ID_NAME,
  37. ID_TYPE,
  38. ID_WIDTH,
  39. ID_HEIGHT,
  40. ID_SIZELABEL,
  41. ID_TILESET,
  42. ID_EXTENDED,
  43. ID_EFFECTS,
  44. ID_OK,
  45. ID_CANCEL,
  46. };
  47. static class LayerPropertiesDialog* dialog;
  48. private:
  49. int initialized;
  50. const class LayerEdit* layer;
  51. public:
  52. LayerPropertiesDialog();
  53. static class LayerPropertiesDialog* create();
  54. static void destroy();
  55. int run(int allowTypeChange, Layer::LayerType* type, std::string* title, int* xSize, int* ySize, int* tilesetId, int* usesExtended, int* usesEffects, const LayerEdit* whichLayer);
  56. ButtonAction verifyEntry(int buttonId, ButtonAction buttonType);
  57. };
  58. #endif