| 1 | //============================================================================ | 
|---|
| 2 | // | 
|---|
| 3 | //   SSSS    tt          lll  lll | 
|---|
| 4 | //  SS  SS   tt           ll   ll | 
|---|
| 5 | //  SS     tttttt  eeee   ll   ll   aaaa | 
|---|
| 6 | //   SSSS    tt   ee  ee  ll   ll      aa | 
|---|
| 7 | //      SS   tt   eeeeee  ll   ll   aaaaa  --  "An Atari 2600 VCS Emulator" | 
|---|
| 8 | //  SS  SS   tt   ee      ll   ll  aa  aa | 
|---|
| 9 | //   SSSS     ttt  eeeee llll llll  aaaaa | 
|---|
| 10 | // | 
|---|
| 11 | // Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony | 
|---|
| 12 | // and the Stella Team | 
|---|
| 13 | // | 
|---|
| 14 | // See the file "License.txt" for information on usage and redistribution of | 
|---|
| 15 | // this file, and for a DISCLAIMER OF ALL WARRANTIES. | 
|---|
| 16 | //============================================================================ | 
|---|
| 17 |  | 
|---|
| 18 | #ifndef JOYSTICK_DIALOG_HXX | 
|---|
| 19 | #define JOYSTICK_DIALOG_HXX | 
|---|
| 20 |  | 
|---|
| 21 | class CommandSender; | 
|---|
| 22 | class GuiObject; | 
|---|
| 23 | class ButtonWidget; | 
|---|
| 24 | class EditTextWidgetWidget; | 
|---|
| 25 | class StringListWidget; | 
|---|
| 26 |  | 
|---|
| 27 | #include "Dialog.hxx" | 
|---|
| 28 |  | 
|---|
| 29 | /** | 
|---|
| 30 | * Show a listing of joysticks currently stored in the eventhandler database, | 
|---|
| 31 | * and allow to remove those that aren't currently being used. | 
|---|
| 32 | */ | 
|---|
| 33 | class JoystickDialog : public Dialog | 
|---|
| 34 | { | 
|---|
| 35 | public: | 
|---|
| 36 | JoystickDialog(GuiObject* boss, const GUI::Font& font, | 
|---|
| 37 | int max_w, int max_h); | 
|---|
| 38 | virtual ~JoystickDialog() = default; | 
|---|
| 39 |  | 
|---|
| 40 | /** Place the dialog onscreen and center it */ | 
|---|
| 41 | void show() { open(); } | 
|---|
| 42 |  | 
|---|
| 43 | private: | 
|---|
| 44 | void loadConfig() override; | 
|---|
| 45 | void handleCommand(CommandSender* sender, int cmd, int data, int id) override; | 
|---|
| 46 |  | 
|---|
| 47 | private: | 
|---|
| 48 | StringListWidget* myJoyList; | 
|---|
| 49 | EditTextWidget*   myJoyText; | 
|---|
| 50 |  | 
|---|
| 51 | ButtonWidget* myRemoveBtn; | 
|---|
| 52 | ButtonWidget* myCloseBtn; | 
|---|
| 53 |  | 
|---|
| 54 | IntArray myJoyIDs; | 
|---|
| 55 |  | 
|---|
| 56 | enum { kRemoveCmd = 'JDrm' }; | 
|---|
| 57 |  | 
|---|
| 58 | private: | 
|---|
| 59 | // Following constructors and assignment operators not supported | 
|---|
| 60 | JoystickDialog() = delete; | 
|---|
| 61 | JoystickDialog(const JoystickDialog&) = delete; | 
|---|
| 62 | JoystickDialog(JoystickDialog&&) = delete; | 
|---|
| 63 | JoystickDialog& operator=(const JoystickDialog&) = delete; | 
|---|
| 64 | JoystickDialog& operator=(JoystickDialog&&) = delete; | 
|---|
| 65 | }; | 
|---|
| 66 |  | 
|---|
| 67 | #endif | 
|---|
| 68 |  | 
|---|