Update of /cvsroot/audacity/lib-src/FileDialog
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv617/FileDialog

Added Files:
        FileDialog.cpp FileDialog.h FileDialog.vcproj Makefile 
Log Message:
New FileDialog (modified wx(Generic)FileDialog actually) that adds support
for an extra button.  (All this just for one little old button... ;-))


--- NEW FILE: FileDialog.vcproj ---
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
        ProjectType="Visual C++"
        Version="8.00"
        Name="FileDialog"
        ProjectGUID="{5284D863-3813-479F-BBF0-AC234E216BC6}"
        RootNamespace="FileDialog"
        Keyword="Win32Proj"
        >
        <Platforms>
                <Platform
                        Name="Win32"
                />
        </Platforms>
        <ToolFiles>
        </ToolFiles>
        <Configurations>
                <Configuration
                        Name="Debug|Win32"
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"
                        IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="4"
                        CharacterSet="2"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        />
                        <Tool
                                Name="VCXMLDataGeneratorTool"
                        />
                        <Tool
                                Name="VCWebServiceProxyGeneratorTool"
                        />
                        <Tool
                                Name="VCMIDLTool"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
                                
AdditionalIncludeDirectories="&quot;$(WXWIN)\lib\vc_lib\mswd&quot;;&quot;$(WXWIN)\include&quot;"
                                
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__WXMSW__"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
                                Detect64BitPortabilityProblems="true"
                                DebugInformationFormat="4"
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
                        />
                        <Tool
                                Name="VCPreLinkEventTool"
                        />
                        <Tool
                                Name="VCLibrarianTool"
                                OutputFile="filedialogd.lib"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                        <Tool
                                Name="VCXDCMakeTool"
                        />
                        <Tool
                                Name="VCBscMakeTool"
                        />
                        <Tool
                                Name="VCFxCopTool"
                        />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                </Configuration>
                <Configuration
                        Name="Release|Win32"
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"
                        IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="4"
                        CharacterSet="2"
                        WholeProgramOptimization="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        />
                        <Tool
                                Name="VCXMLDataGeneratorTool"
                        />
                        <Tool
                                Name="VCWebServiceProxyGeneratorTool"
                        />
                        <Tool
                                Name="VCMIDLTool"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
                                
AdditionalIncludeDirectories="&quot;$(WXWIN)\lib\vc_lib\msw&quot;;&quot;$(WXWIN)\include&quot;"
                                
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__"
                                RuntimeLibrary="0"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
                                Detect64BitPortabilityProblems="true"
                                DebugInformationFormat="3"
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
                        />
                        <Tool
                                Name="VCPreLinkEventTool"
                        />
                        <Tool
                                Name="VCLibrarianTool"
                                OutputFile="filedialog.lib"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                        <Tool
                                Name="VCXDCMakeTool"
                        />
                        <Tool
                                Name="VCBscMakeTool"
                        />
                        <Tool
                                Name="VCFxCopTool"
                        />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                </Configuration>
                <Configuration
                        Name="Unicode_Debug|Win32"
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"
                        IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="4"
                        CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        />
                        <Tool
                                Name="VCXMLDataGeneratorTool"
                        />
                        <Tool
                                Name="VCWebServiceProxyGeneratorTool"
                        />
                        <Tool
                                Name="VCMIDLTool"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
                                
AdditionalIncludeDirectories="&quot;$(WXWIN)\lib\vc_lib\mswd&quot;;&quot;$(WXWIN)\include&quot;"
                                
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__WXMSW__"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
                                Detect64BitPortabilityProblems="true"
                                DebugInformationFormat="4"
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
                        />
                        <Tool
                                Name="VCPreLinkEventTool"
                        />
                        <Tool
                                Name="VCLibrarianTool"
                                OutputFile="filedialogud.lib"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                        <Tool
                                Name="VCXDCMakeTool"
                        />
                        <Tool
                                Name="VCBscMakeTool"
                        />
                        <Tool
                                Name="VCFxCopTool"
                        />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                </Configuration>
                <Configuration
                        Name="Unicode_Release|Win32"
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"
                        IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="4"
                        CharacterSet="1"
                        WholeProgramOptimization="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        />
                        <Tool
                                Name="VCXMLDataGeneratorTool"
                        />
                        <Tool
                                Name="VCWebServiceProxyGeneratorTool"
                        />
                        <Tool
                                Name="VCMIDLTool"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
                                
AdditionalIncludeDirectories="&quot;$(WXWIN)\lib\vc_lib\msw&quot;;&quot;$(WXWIN)\include&quot;"
                                
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__"
                                RuntimeLibrary="0"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
                                Detect64BitPortabilityProblems="true"
                                DebugInformationFormat="3"
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
                        />
                        <Tool
                                Name="VCPreLinkEventTool"
                        />
                        <Tool
                                Name="VCLibrarianTool"
                                OutputFile="filedialogu.lib"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                        <Tool
                                Name="VCXDCMakeTool"
                        />
                        <Tool
                                Name="VCBscMakeTool"
                        />
                        <Tool
                                Name="VCFxCopTool"
                        />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                </Configuration>
        </Configurations>
        <References>
        </References>
        <Files>
                <Filter
                        Name="Source Files"
                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
                        
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
                        >
                        <File
                                RelativePath=".\FileDialog.cpp"
                                >
                        </File>
                        <Filter
                                Name="win"
                                >
                                <File
                                        RelativePath=".\win\FileDialog.hpp"
                                        >
                                </File>
                        </Filter>
                </Filter>
                <Filter
                        Name="Header Files"
                        Filter="h;hpp;hxx;hm;inl;inc;xsd"
                        
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
                        >
                        <File
                                RelativePath=".\FileDialog.h"
                                >
                        </File>
                        <Filter
                                Name="win"
                                >
                                <File
                                        RelativePath=".\win\FileDialog.h"
                                        >
                                </File>
                        </Filter>
                </Filter>
        </Files>
        <Globals>
        </Globals>
</VisualStudioProject>

--- NEW FILE: FileDialog.h ---
/////////////////////////////////////////////////////////////////////////////
// Name:        filedlg.h
// Purpose:     wxFileDialog base header
// Author:      Robert Roebling
// Modified by:
// Created:     8/17/99
// Copyright:   (c) Robert Roebling
// RCS-ID:      $Id: FileDialog.h,v 1.1 2007/04/06 10:16:52 llucius Exp $
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef _FILE_DIALOG_H_
#define _FILE_DIALOG_H_

#include "wx/defs.h"
#include "wx/filedlg.h"

typedef void (*fdCallback)(void *, int);

#if defined(__WXMAC__)
#include "mac/FileDialog.h"
#elif defined(__WXMSW__)
#include "win/FileDialog.h"
#elif defined(__WXGTK__)
#include "gtk/FileDialog.h"
#else
#include "generic/FileDialog.h"
#endif

#endif

--- NEW FILE: Makefile ---

CXXFLAGS = -O2
CXXFLAGS += $(shell wx-config --unicode=yes --cxxflags)

ifneq ($(findstring __WXGTK__,$(CXXFLAGS)),)
CXXFLAGS += $(shell pkg-config gtk+-2.0 --cflags)
endif

all: FileDialog.a

clean:
        rm -f *.o *.a

distclean: clean

FileDialog.a: FileDialog.o
        $(AR) $(ARFLAGS) $@ $<

FileDialog.o: FileDialog.cpp FileDialog.h


--- NEW FILE: FileDialog.cpp ---
/**********************************************************************

  Audacity: A Digital Audio Editor

  FileDialog.cpp

  Leland Lucius

*******************************************************************//**

\class FileDialog
\brief Dialog used to present platform specific "Save As" dialog with
custom controls.

*//*******************************************************************/

#include "FileDialog.h"

#if defined(__WXMAC__)
#include "mac/FileDialog.hpp"
#elif defined(__WXMSW__)
#include "win/FileDialog.hpp"
#elif defined(__WXGTK__)
#include "gtk/FileDialog.hpp"
#else
#include "generic/FileDialog.hpp"
#endif

void FileDialog::EnableButton(wxString label, fdCallback cb, void *data)
{
   m_buttonlabel = label;
   m_callback = cb;
   m_cbdata = data;
}

void FileDialog::ClickButton(int index)
{
   if (m_callback)
   {
      m_callback(m_cbdata, index);
   }
}

// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: 94f72c32-970b-4f4e-bbf3-3880fce7b965


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to