📄 idialog.h
字号:
#ifndef IFME_DIALOG_H
#define IFME_DIALOG_H
// $Id: idialog.h,v 17.1.2.1 2006/03/09 01:19:52 zwang Exp $
/*! \file idialog.h
\brief Defines the IFMEDialog interface.
*/
/*! \internal
============================================================================
Name : idialog.h
System : FME Objects
Language : C++
Purpose : Definition of Class "IFMEDialog"
Author Date Changes made
------------------ ------------ -------------------------------
Don Murray Aug 31, 1999 Original Implementation
Dale Lutz Dec 01, 1999 Modified "generate" entry point
to generate workspaces
Dale Lutz Dec 03, 1999 Added entry point for getting
coordinate system identifiers and
also for GUI parameter prompting
Dale Lutz Dec 09, 1999 Allow ONLY the settings box to be
shown when the source/dest prompts
are displayed
Dale Lutz Feb 02, 2000 Added xlatePrompt to prompt for
complete translations
Dale Lutz Aug 30, 2000 Added ability to set parent handle
Amy Tran Nov 27, 2001 Added the ability to get information
about the formats supported. (PR#940)
Juan Chu Chow Dec 27, 2001 Added getAvailableFormats(),
getFormatInfo() (Issue#1147)
Amy Tran Jan 24, 2001 A new entry for getFormatInfo. (PR#1199)
Juan Chu Chow Sep 18, 2002 Added getFormatInfoEx(). (PR#1710)
Tom Weir Jun 01, 2004 Fixed documentation.
Kaustav Mukherjee Nov 16, 2004 Added the internal tag to hide this revision control part.
Fixed some minor formatting bugs.
Copyright (c) 1995 - 2005, Safe Software Inc.
All Rights Reserved
This software may not be copied or reproduced, in all or in part,
without the prior written consent of Safe Software Inc.
The entire risk as to the results and performance of the software,
supporting text and other information contained in this file
(collectively called the "Software") is with the user.
In no event will Safe Software Incorporated be liable for damages,
including loss of profits or consequential damages, arising out of
the use of the Software.
*/
/*! \class IFMEDialog
\brief Dialog class
The FMEODialog class provides access to the standard FME dialog boxes.
FMEODialog works closely with FMEOReader and FMEOWriter to encapsulate
all the format specific information that readers and writers require during
initialization.
*/
#include "fmetypes.h"
class IFMEDialog;
class IFMEFeature;
class IFMESession;
// Now we define the exports.
#ifdef WIN32
// pull in the definition of HWND
#include <windows.h>
#ifdef FME_DLL
#define FMESESSION_API __declspec(dllexport)
#else
#define FMESESSION_API __declspec(dllimport)
#endif
#else
#define FMESESSION_API
#endif // end of WIN32.
//======================================================================
// Interface Class
//
class IFMEDialog
{
public:
// --- COMMON PUBLIC MEMBER FUNCTIONS
// -----------------------------------------------------------------------
/*! This method displays a dialog to prompt the user to choose a source format and dataset.
// The two input parameters point to a default format and dataset.
// If none are desired, then these should be input as 0 length strings.
//
// The "userDirectives" is used as both an input and output parameter.
// These userDirectives are encoded into the array with each
// user directive taking two positions in the array. The
// first position in each pair is the directive identifier
// and the second position is the directive value.
//
// On input these directives are honoured:
// <dl>
// <dt><b>"TITLE"</b></dt>
// <dd>The title to be used in the dialog box</dd>
// <dt><b>"LIMIT_FORMATS"</b></dt>
// <dd>The short names of the only formats that will be allowed,
// separated by | characters.</dd>
// <dt><b>"SETTINGS_ONLY"</b></dt>
// <dd>If value is "yes", then the settings box only is
// shown for the passed in default source format/dataset.</dd>
// <dd>The default is "no".</dd>
// <dt><b>"SPATIAL_SETTINGS"</b></dt>
// <dd>If value is "yes", then the any settings box
// that allows for specifying spatial constraints will
// have that aspect remain enabled.</dd>
// <dd>If the value is "no", then the spatial area
// specification aspect of the settings boxes is disabled.</dd>
// <dd>The default is "yes".</dd>
// <dd>This directive is useful for disabling spatial settings when
// a source dialog is done only for the purpose of gathering
// for schema information.</dd>
// </dl>
//
// FME_FALSE is returned if they pressed cancel,
// otherwise FME_TRUE is returned.
//
// This function returns an IFMEStringArray of userDirectives.
//
// The directives returned are as follows:
// <dl>
// <dt><b>"RUNTIME_MACROS"</b></dt><dd>The runtime macros are in the next position.</dd>
// <dt><b>"META_MACROS"</b></dt><dd>The metafile macros are in the next position.</dd>
// <dt><b>"METAFILE"</b></dt><dd>The metafile name is in the next position.</dd>
// <dt><b>"COORDSYS"</b></dt><dd>The coordinate system is in the next position.</dd>
// <dt><b>"IDLIST"</b></dt><dd>The id list is in the next position.</dd>
// </dl>
// This array can be passed untouched to the reader userdirectives
// parameter tieing the IFMEDialog and the IFMEUniversalReader object
// together easily.
// */
virtual FME_Boolean sourcePrompt(const char* defaultSourceFormat,
const char* defaultSourceDataset,
IFMEString& sourceFormat,
IFMEString& sourceDataset,
IFMEStringArray& userDirectives) const = 0;
// -----------------------------------------------------------------------
/*! This method displays a dialog to prompt the user to choose a destination format and dataset.
// The two input parameters point to a default format and dataset.
// If none are desired, then these should be input as 0 length strings.
//
// The "userDirectives" is used as both an input and output parameter.
// These userDirectives are encoded into the array with each
// user directive taking two positions in the array. The
// first position in each pair is the directive identifier
// and the second position is the directive value.
//
// On input these directives are honoured:
// <dl>
// <dt><b>"TITLE"</b></dt>
// <dd>The title to be used in the dialog box</dd>
// <dt><b>"LIMIT_FORMATS"</b></dt>
// <dd>The short names of the only formats that will be allowed,
// separated by | characters.</dd>
// <dt><b>"SETTINGS_ONLY"</b></dt>
// <dd>If value is "yes", then the settings box only is
// shown for the passed in default source format/dataset</dd>
// <dd>The default is "no".</dd>
// <dt><b>"SPATIAL_SETTINGS"</b></dt>
// <dd>If value is "yes", then any settings box that allows for
// specifying spatial constraints will have that aspect remain enabled.
// The default is "yes".</dd>
// <dd>If the value is "no", then the spatial area specification aspect of
// the settings boxes is disabled.</dd>
// <dd>This directive is useful for disabling spatial settings when a source dialog is
// done only for the purpose of gathering schema information.</dd>
// </dl>
//
// FME_FALSE is returned if they pressed cancel,
// otherwise FME_TRUE is returned.
//
// This function returns an IFMEStringArray of userDirectives.
//
// The directives returned are as follows:
//
// <dl>
// <dt><b>"RUNTIME_MACROS"</b></dt><dd>The runtime macros are in the next position.</dd>
// <dt><b>"META_MACROS"</b></dt><dd>The metafile macros are in the next position.</dd>
// <dt><b>"METAFILE"</b></dt><dd>The metafile name is in the next position.</dd>
// <dt><b>"COORDSYS"</b></dt><dd>The coordinate system is in the next position.</dd>
// </dl>
//
// This array can be passed untouched to the writer userdirectives
// parameter tieing the IFMEDialog and the IFMEUniversalWriter object
// together easily.
// */
virtual FME_Boolean destPrompt(const char* defaultDestFormat,
const char* defaultDestDataset,
IFMEString& destFormat,
IFMEString& destDataset,
IFMEStringArray& userDirectives) const = 0;
// -----------------------------------------------------------------------
/*! This method displays a dialog box that shows the kind of FME
// license and FME build number that the FMEObjects application is using.
// The application name passed in will appear in the dialog box. */
virtual void about(const char* applicationName) const = 0;
// -----------------------------------------------------------------------
/*! This method displays the GenerateWorkspace dialog box.
// The parameterFileName that is returned can be used to generate a
// workspace with this FME invocation:
//
// fme PARAMETER_FILE <parameterFile>
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -