Labyrinth
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
loginform.hpp
1 //////////////////////////////
2 //
3 // File: labyrinth/online/loginform.hpp
4 // Author: Maciej Kaminski
5 // E-mail: maciej.a.kaminski@gmail.com
6 // Website: maciejkaminski.pl
7 //
8 // File creation date: Jun 2014
9 // This file is part of Project Labyrinth
10 // This file is going to be released under terms of GNU GPL in near future
11 //
12 //////////////////////////////
13 
14 #ifndef __LXS_LABONLINE_LOFO__
15 #define __LXS_LABONLINE_LOFO__
16 #include "lxs/windowing/button.hpp"
17 #include "lxs/windowing/form.hpp"
18 namespace Labyrinth
19 {
20  //! namespace for "online" features of Labyrinth
21  namespace Online
22  {
23 
24  //! generalized login/password form
26  {
27  protected:
30  LxS::Windowing::TextEdit * password;
31  LxS::Windowing::Button * enter;
32  public:
33  void Initialize();
35  :loc(_loc)
36  {
37  }
38  };
39  //end of class LoginForm
40 
41  //! form to login to an existing account
42  class LoginForm: public LoginPassword
43  {
44  protected:
45  virtual void Login(LxS::Windowing::Button * b);
46  public:
47  void Initialize();
49  :LoginPassword(_loc)
50  {
51  }
52  };
53  //end of class LoginForm
54 
55  //! generalized login/password form - one that allows changing password
56  class SetPWForm: public LoginPassword
57  {
58 
59  virtual void SetPW(LxS::Windowing::Button * b);
60  public:
62  :LoginPassword(_loc)
63  {
64  }
65  void Initialize();
66  };
67  //end of class CreateAccount
68 
69  //! form for creation of a new account
70  class CreateAccount: public SetPWForm
71  {
72  public:
74  :SetPWForm(_loc)
75  {
76  }
77  void Initialize();
78  };
79  //end of class CreateAccount
80 
81  //! form to alter password to an existing account
82  class SetPassword: public SetPWForm
83  {
84  public:
86  :SetPWForm(_loc)
87  {
88  }
89  void Initialize();
90  ~SetPassword()
91  {
92  delete login;
93  }
94  };
95  //end of class SetPassword
96 
97 
98  }
99 }
100 #endif