Planeshift
pawsmeterpromptwindow.h
Go to the documentation of this file.
1 /*
2  * pawsmeterpromptwindow.h, Author: Andrea Rizzi <88whacko@gmail.com>
3  *
4  * Copyright (C) 2001-2011 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
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  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef PAWS_MUSIC_METER_PROMPT_H
21 #define PAWS_MUSIC_METER_PROMPT_H
22 
23 
24 //====================================================================================
25 // Local Includes
26 //====================================================================================
27 #include "pawspromptwindow.h"
28 
29 //------------------------------------------------------------------------------------
30 // Forward Declarations
31 //------------------------------------------------------------------------------------
32 class pawsTextBox;
33 class pawsComboBox;
34 class pawsEditTextBox;
35 
44 {
45 public:
52  virtual void OnMeterEntered(const char* name, csString beats, csString beatType) = 0;
53 };
54 
55 //---------------------------------------------------------------------------------------------
56 
61 {
62 public:
67 
72  pawsMeterInput(const pawsMeterInput &origin);
73 
80  void Initialize(const char* initialBeats, const char* initialBeatType, size_t beatsMaxLength);
81 
86  const char* GetBeats();
87 
92  csString GetBeatType();
93 
94 private:
95  pawsTextBox* beatsLabel;
96  pawsTextBox* beatTypeLabel;
97  pawsEditTextBox* beatsInput;
98  pawsComboBox* beatTypeInput;
99 };
100 
102 
103 //---------------------------------------------------------------------------------------------
104 
109 {
110 public:
115 
121 
131  void Initialize(const char* actionName, const char* title, const char* initialBeats,
132  const char* initialBeatType, size_t beatsMaxLength, iOnMeterEnteredListener* listener);
133 
134  // From pawsWidget
135  //-----------------
136  virtual bool PostSetup();
137  virtual bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget* widget);
138 
148  static pawsMeterPromptWindow* Create(const char* actionName, const char* initialBeats,
149  const char* initialBeatType, size_t beatsMaxLength, iOnMeterEnteredListener* listener);
150 
151 private:
152  csString actionName;
153  iOnMeterEnteredListener* meterListener;
154 };
155 
157 
160 #endif // PAWS_MUSIC_METER_PROMPT_H
CREATE_PAWS_FACTORY(pawsMeterInput)
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
Interface implemented by a pawsMeterPromptWindow listener.
An edit box widget/.
Definition: pawstextbox.h:409
void void Initialize(iObjectRegistry *object_reg)
pawsPromptWindow is the common base for windows that let the user enter one piece of information...
virtual void OnMeterEntered(const char *name, csString beats, csString beatType)=0
This function is called when the user input a meter.
A basic combo box widget.
Definition: pawscombo.h:53
This is the main input widget of pawsMeterPromptWindow.
This window let the user select the music meter for a score.
A basic text box widget.
Definition: pawstextbox.h:42