FreeburnPreferences.h
上传用户:cnxinhai
上传日期:2013-08-06
资源大小:265k
文件大小:5k
源码类别:

DVD

开发平台:

Visual C++

  1. /* This is the class description for the Preferences Dialog.
  2.  *
  3.  * Copyright (C) 2001, 2002  Adam Schlag
  4.  */
  5. /*
  6.  * FreeBurn Software License
  7.  * (based on the Apache Software License)
  8.  * 
  9.  * Version 1.1
  10.  * 
  11.  * Copyright (c) 2001, 2002 The FreeBurn Project. All rights reserved.
  12.  * 
  13.  * Redistribution and use in source and binary forms, with or without 
  14.  * modification, are permitted provided that the following conditions are met:
  15.  * 
  16.  * 1. Redistributions of source code must retain the above copyright 
  17.  * notice, this list of conditions and the following disclaimer.
  18.  * 
  19.  * 2. Redistributions in binary form must reproduce the above copyright 
  20.  * notice, this list of conditions and the following disclaimer in the 
  21.  * documentation and/or other materials provided with the distribution.
  22.  * 
  23.  * 3. The end-user documentation included with the redistribution, if any, must 
  24.  * include the following acknowledgment:
  25.  * 
  26.  *  "This product includes software developed by the FreeBurn 
  27.  *     Project (http://freeburn.sourceforge.net/)."
  28.  * 
  29.  * Alternately, this acknowledgment may appear in the software itself, 
  30.  * if and wherever such third-party acknowledgments normally appear.
  31.  * 
  32.  * 4. The names "FreeBurn" and "FreeBurn Project" must not be 
  33.  * used to endorse or promote products derived from this software 
  34.  * without prior written permission. For written permission, please 
  35.  * contact aschlag@users.sourceforge.net.
  36.  * 
  37.  * 5. Products derived from this software may not be called "FreeBurn", 
  38.  * nor may "FreeBurn" appear in their name, without prior written 
  39.  * permission of the FreeBurn Project.
  40.  * 
  41.  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED 
  42.  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 
  43.  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
  44.  * DISCLAIMED. IN NO EVENT SHALL THE FREEBURN PROJECT OR ITS 
  45.  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
  46.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
  47.  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 
  48.  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
  49.  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
  50.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 
  51.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
  52.  * SUCH DAMAGE.
  53.  * 
  54.  * This software consists of voluntary contributions made by many 
  55.  * individuals on behalf of the FreeBurn Project. For more 
  56.  * information on the FreeBurn Project and FreeBurn, please see 
  57.  * <http://freeburn.sourceforge.net/>.
  58.  * 
  59.  * This software is distributed with software that is released under the GNU 
  60.  * General Public License (GPL).  You can find the terms of this license in the
  61.  * file GPL.txt distributed in this package.  You can find information on the
  62.  * software distributed with this package in the file PROGRAMS.txt.
  63.  */
  64. class CFreeburnPreferences : public FXDialogBox 
  65. {
  66.     FXDECLARE(CFreeburnPreferences)
  67.   
  68. public:
  69.     CFreeburnPreferences(FXWindow *owner, FXint currentTheme);
  70.     virtual ~CFreeburnPreferences();
  71.     
  72.     // methods for get/set on the loaded theme
  73.     FXint getThemePrefs();
  74.     void  setThemePrefs(FXint theme);
  75.     
  76.     // method to set the find icon to use in the dialog
  77.     void setFindIcon(FXIcon* findIcon);
  78.     
  79.     // method to set the icon for the preview label
  80.     FXLabel* getPreviewLabel();
  81.     
  82.     // methods to get/set the text for the command paths
  83.     void     setShellString(FXString string);
  84.     FXString getShellString();
  85.     void     setCdrecordString(FXString string);
  86.     FXString getCdrecordString();
  87.     void     setMkisofsString(FXString string);
  88.     FXString getMkisofsString();
  89.     void     setCdrdaoString(FXString string);
  90.     FXString getCdrdaoString();
  91.     
  92.     // these handle opening file dialogs for locating programs
  93.     long onFindShellPath    (FXObject*, FXSelector, void*);
  94.     long onFindCdrecordPath (FXObject*, FXSelector, void*);
  95.     long onFindMkisofsPath  (FXObject*, FXSelector, void*);
  96.     long onFindCdrdaoPath   (FXObject*, FXSelector, void*);
  97.     
  98.     // command id's
  99.     enum{
  100.         ID_FINDSHELL=FXDialogBox::ID_LAST,
  101.         ID_FINDCDRECORD,
  102.         ID_FINDMKISOFS,
  103.         ID_FINDCDRDAO,
  104.         ID_LAST
  105.     };
  106.     
  107. protected:    
  108.   
  109. private:
  110.     // Dialog Icons
  111.     FXIcon* m_ProgramsIcon;
  112.     FXIcon* m_ThemesIcon;
  113.     FXIcon* m_DefaultThemeIcon;
  114.     FXIcon* m_GNOMEThemeIcon;
  115.     FXIcon* m_KDEThemeIcon;
  116.     FXIcon* m_XPThemeIcon;
  117.     
  118.     // Buttons to launch a file dialog to specify a file name
  119.     // For the programs to use
  120.     FXButton* m_FindShellButton;
  121.     FXButton* m_FindCdrecordButton;
  122.     FXButton* m_FindMkisofsButton;
  123.     FXButton* m_FindCdrdaoButton;
  124.     
  125.     // String for the current theme
  126.     FXint m_CurrentTheme;
  127.     
  128.     // Label to contain a preview of the theme icons
  129.     FXLabel* m_PreviewLabel;
  130.     
  131.     // Text fields for the program paths/locations
  132.     FXTextField* m_shellField;
  133.     FXTextField* m_cdrecordField;
  134.     FXTextField* m_mkisofsField;
  135.     FXTextField* m_cdrdaoField;
  136.     
  137.     CFreeburnPreferences(){}
  138.     CFreeburnPreferences(const CFreeburnPreferences&);
  139. };
  140.