ControlBarResizer.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. ////////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // FILE: ControlBarResizer.h /////////////////////////////////////////////////
  24. //-----------------------------------------------------------------------------
  25. //
  26. // Electronic Arts Pacific.
  27. //
  28. // Confidential Information
  29. // Copyright (C) 2002 - All Rights Reserved
  30. //
  31. //-----------------------------------------------------------------------------
  32. //
  33. // created: Sep 2002
  34. //
  35. // Filename: ControlBarResizer.h
  36. //
  37. // author: Chris Huybregts
  38. //
  39. // purpose:
  40. //
  41. //-----------------------------------------------------------------------------
  42. ///////////////////////////////////////////////////////////////////////////////
  43. #pragma once
  44. #ifndef __CONTROL_BAR_RESIZER_H_
  45. #define __CONTROL_BAR_RESIZER_H_
  46. //-----------------------------------------------------------------------------
  47. // SYSTEM INCLUDES ////////////////////////////////////////////////////////////
  48. //-----------------------------------------------------------------------------
  49. //-----------------------------------------------------------------------------
  50. // USER INCLUDES //////////////////////////////////////////////////////////////
  51. //-----------------------------------------------------------------------------
  52. //-----------------------------------------------------------------------------
  53. // FORWARD REFERENCES /////////////////////////////////////////////////////////
  54. //-----------------------------------------------------------------------------
  55. //-----------------------------------------------------------------------------
  56. // TYPE DEFINES ///////////////////////////////////////////////////////////////
  57. //-----------------------------------------------------------------------------
  58. class ResizerWindow
  59. {
  60. public:
  61. ResizerWindow( void );
  62. AsciiString m_name;
  63. ICoord2D m_defaultSize;
  64. ICoord2D m_defaultPos;
  65. ICoord2D m_altSize;
  66. ICoord2D m_altPos;
  67. };
  68. class ControlBarResizer
  69. {
  70. public:
  71. ControlBarResizer( void );
  72. ~ControlBarResizer( void );
  73. void init( void );
  74. // parse Functions for the INI file
  75. const FieldParse *getFieldParse() const { return m_controlBarResizerParseTable; } ///< returns the parsing fields
  76. static const FieldParse m_controlBarResizerParseTable[]; ///< the parse table
  77. ResizerWindow *findResizerWindow( AsciiString name ); ///< attempt to find the control bar scheme by it's name
  78. ResizerWindow *newResizerWindow( AsciiString name ); ///< create a new control bar scheme and return it.
  79. void sizeWindowsDefault( void );
  80. void sizeWindowsAlt( void );
  81. typedef std::list< ResizerWindow *> ResizerWindowList;
  82. ResizerWindowList m_resizerWindowsList;
  83. };
  84. //-----------------------------------------------------------------------------
  85. // INLINING ///////////////////////////////////////////////////////////////////
  86. //-----------------------------------------------------------------------------
  87. //-----------------------------------------------------------------------------
  88. // EXTERNALS //////////////////////////////////////////////////////////////////
  89. //-----------------------------------------------------------------------------
  90. #endif // __CONTROL_BAR_RESIZER_H_