///////////////////////////////////////////////////////////////////////////////
//                                                                           //
// File:           CC121Options.h                                            //
//                                                                           //
// Functionality:  Control surface option helper class definition.           //
//                                                                           //
// Author:         Rolf Meyerhoff (rm@matrix44.de)                           //
//                                                                           //
// Copyright:      (C) 2009 by Rolf Meyerhoff. All rights reserved.          //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
// License:                                                                  //
//                                                                           //
// This library is free software;  you can redistribute it  and/or modify it //
// under the terms of the GNU Lesser  General Public License as published by //
// the Free Software Foundation;  either version 2.1 of the License,  or (at //
// your option) any later version.                                           //
//                                                                           //
// This  library is  distributed in  the hope that  it will  be useful,  but //
// WITHOUT   ANY   WARRANTY;   without   even   the   implied  warranty   of //
// MERCHANTABILITY or FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU Lesser //
// General Public License for more details.                                  //
//                                                                           //
// You should have received a copy of  the GNU Lesser General Public License //
// along with this library;  if not,  write to the Free Software Foundation, //
// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.              //
///////////////////////////////////////////////////////////////////////////////
#ifndef __CC121OPTIONS_H_INCLUDED__
#define __CC121OPTIONS_H_INCLUDED__

///////////////////////////////////////////////////////////////////////////////
// struct CC121Options
///////////////////////////////////////////////////////////////////////////////
// This structure holds the options of this control and handles configuration
// reads and writes.
///////////////////////////////////////////////////////////////////////////////
struct CC121Options
{
  /////////////////////////////////////////////////////////////////////////////
  // CC121Options::CC121Options()
  /////////////////////////////////////////////////////////////////////////////
  // Description:  Default constructor of this struct.
  // Parameters:   None.
  // Return value: No return value.
  // Remarks:      Just initializes the members of this struct.
  /////////////////////////////////////////////////////////////////////////////
  CC121Options();

  /////////////////////////////////////////////////////////////////////////////
  // CC121Options::CC121Options()
  /////////////////////////////////////////////////////////////////////////////
  // Description:  Copy constructor of this struct.
  // Parameters:   [in] other: The source struct to copy.
  // Return value: No return value.
  // Remarks:      Just copies the members of the source struct.
  /////////////////////////////////////////////////////////////////////////////
  CC121Options(const CC121Options& other);

  /////////////////////////////////////////////////////////////////////////////
  // CC121Options::CC121Options()
  /////////////////////////////////////////////////////////////////////////////
  // Description:  Initialization constructor of this struct.
  // Parameters:   [in] config: The members of this struct as text.
  // Return value: No return value.
  // Remarks:      The configuration is just a sequence of int values. This
  //               constructor just loads these values and initializes the
  //               members of this struct.
  /////////////////////////////////////////////////////////////////////////////
  CC121Options(const char* config);

  /////////////////////////////////////////////////////////////////////////////
  // CC121Options::~CC121Options()
  /////////////////////////////////////////////////////////////////////////////
  // Description:  Destructor of this struct.
  // Parameters:   None.
  // Return value: No return value.
  // Remarks:      Clears up all allocated resources.
  /////////////////////////////////////////////////////////////////////////////
  ~CC121Options();

  /////////////////////////////////////////////////////////////////////////////
  // CC121Options::WriteConfig()
  /////////////////////////////////////////////////////////////////////////////
  // Description:  Write members of this struct to a string.
  // Parameters:   [out] config: Receives the members of this struct as text.
  // Return value: No return value.
  // Remarks:      The configuration is just a sequence of int values. This
  //               functions just writes the members of this struct into the
  //               provided buffer.
  /////////////////////////////////////////////////////////////////////////////
  void WriteConfig(char* config) const;

  /////////////////////////////////////////////////////////////////////////////
  // Member
  /////////////////////////////////////////////////////////////////////////////

  // The skip buttons go straight to start and end and not to the next marker:
  bool skipToStartEnd;

  // Speed setting of the rotary encoders (1 - 99 are reasonable values):
  int rotarySpeed;

  // MIDI input device number to use:
  int midiInDev;

  // MIDI output device number to use:
  int midiOutDev;

  // Wrap around when selecting channels?
  bool wrapAround;

  // Use the MCP to select channels?
  bool useMCP;

  // Rotary encoder acceleration (1 - 200 are reasonable):
  int rotaryAccel;

  // Current action name for the value encoder:
  std::string valueEncCmd;

  // Current action name for the value button:
  std::string valueBtnCmd;

  // Current action name for the function 1 button:
  std::string user1BtnCmd;

  // Current action name for the function 2 button:
  std::string user2BtnCmd;

  // Current action name for the function 3 button:
  std::string user3BtnCmd;

  // Current action name for the function 4 button:
  std::string user4BtnCmd;

  // Current action name for the foot switch:
  std::string ftSwitchCmd;
};

#endif // #ifndef __CC121OPTIONS_H_INCLUDED__
///////////////////////////////// End of File /////////////////////////////////
