Planeshift
pawspromptwindow.h
Go to the documentation of this file.
1 /*
2  * pawspromptwindow.h - Author: Ondrej Hurt
3  *
4  * Copyright (C) 2003 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_PROMPT_WINDOW_HEADER
21 #define PAWS_PROMPT_WINDOW_HEADER
22 
23 #include <csutil/list.h>
24 #include <iutil/document.h>
25 #include "pawswidget.h"
26 
27 class pawsButton;
28 class pawsTextBox;
29 
41 {
42 public:
45  pawsPromptWindow(const pawsPromptWindow &origin);
50  virtual bool PostSetup();
51 
56  void SetLabel(const csString &label);
57 
62  void SetSpacing(int spacing);
63 
64 protected:
66  void SetAppropriatePos();
67 
69  virtual void LayoutWindow();
70 
82  int spacing;
83 };
84 
86 
89 #endif
90 
void SetAppropriatePos()
Sets good position on screen (=under mouse cursor)
virtual void LayoutWindow()
Sets positions of widgets and size of whole window.
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
pawsWidget * inputWidget
The primary widget for gathering input from the user.
int spacing
The spacing in between each of the widgets.
pawsTextBox * label
The label that is used as a title for the window.
CREATE_PAWS_FACTORY(pawsPromptWindow)
pawsPromptWindow()
Basic constructor.
pawsPromptWindow is the common base for windows that let the user enter one piece of information...
void SetLabel(const csString &label)
Sets the label/title for the widget.
A simple button widget.
Definition: pawsbutton.h:43
pawsButton * okButton
The button that is used to accept the input for the window.
void SetSpacing(int spacing)
Sets the spacing in between the widgets.
virtual bool PostSetup()
Executed after the widget is setup.
pawsWidget * helperWidget
A generic widget that simply helps describe or facilitate the inputWidget, does not have to be define...
pawsButton * cancelButton
The button that is used to cancel the input for the window.
A basic text box widget.
Definition: pawstextbox.h:42