~ubuntu-branches/debian/squeeze/stella/squeeze

« back to all changes in this revision

Viewing changes to src/gui/LauncherFilterDialog.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Kitt
  • Date: 2010-07-12 23:49:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100712234936-juawrr3etzhr2qpv
Tags: 3.1.2-1
* New maintainer (closes: #532039).
* New upstream version (closes: #461121):
  - includes launcher (closes: #396058).
* Fix the reference to the X Window System in the description (closes:
  #411815).
* Move to main, DFSG-free ROMs are available (see README.Debian).
* Enhance the package description.
* Drop the libslang2-dev dependency (closes: #560274).
* Remove the Encoding entry from stella.desktop.
* Avoid ignoring errors when cleaning.
* Add ${misc:Depends} to the package dependencies.
* Provide a doc-base file to install the documentation using doc-base.
* Switch to debhelper 7 with a simplified rules file.
* Use autotools-dev to provide updated configuration files.
* Update to Standards-Version 3.9.0:
  - Move to menu section Applications/Emulators.
  - Move the homepage declaration.
* Re-write the manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-2010 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
// $Id: LauncherFilterDialog.hxx 2001 2010-04-10 21:37:23Z stephena $
 
18
//
 
19
//   Based on code from ScummVM - Scumm Interpreter
 
20
//   Copyright (C) 2002-2004 The ScummVM project
 
21
//============================================================================
 
22
 
 
23
#ifndef LAUNCHER_FILTER_DIALOG_HXX
 
24
#define LAUNCHER_FILTER_DIALOG_HXX
 
25
 
 
26
class CommandSender;
 
27
class DialogContainer;
 
28
class CheckboxWidget;
 
29
class PopUpWidget;
 
30
 
 
31
#include "OSystem.hxx"
 
32
#include "Dialog.hxx"
 
33
#include "Settings.hxx"
 
34
#include "StringList.hxx"
 
35
#include "bspf.hxx"
 
36
 
 
37
class LauncherFilterDialog : public Dialog, public CommandSender
 
38
{
 
39
  public:
 
40
    LauncherFilterDialog(GuiObject* boss, const GUI::Font& font);
 
41
    virtual ~LauncherFilterDialog();
 
42
 
 
43
    /** Add valid extensions from 'exts' to the given StringList */
 
44
    static void parseExts(StringList& list, const string& exts);
 
45
 
 
46
    /**
 
47
      Is this a valid ROM filename (does it have a valid extension from
 
48
      those specified in the list of extensions).
 
49
 
 
50
      @param name  Filename of potential ROM file
 
51
      @param exts  The list of extensions to consult
 
52
     */
 
53
    static bool isValidRomName(const string& name, const StringList& exts);
 
54
 
 
55
    /**
 
56
      Is this a valid ROM filename (does it have a valid extension?).
 
57
 
 
58
      @param name  Filename of potential ROM file
 
59
      @param ext   The extension extracted from the given file
 
60
     */
 
61
    static bool isValidRomName(const string& name, string& ext);
 
62
 
 
63
  private:
 
64
    void loadConfig();
 
65
    void saveConfig();
 
66
    void setDefaults();
 
67
 
 
68
    void handleFileTypeChange(const string& type);
 
69
    virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
 
70
 
 
71
  private:
 
72
    PopUpWidget*    myFileType;
 
73
    CheckboxWidget* myRomType[5];
 
74
 
 
75
    enum {
 
76
      kFileTypeChanged = 'LFDc'
 
77
    };
 
78
 
 
79
    // Holds static strings representing ROM types
 
80
    static const char* ourRomTypes[2][5];
 
81
};
 
82
 
 
83
#endif