diff --git a/components/jvcllaz/design/JvDsgnConsts.pas b/components/jvcllaz/design/JvDsgnConsts.pas new file mode 100644 index 000000000..b827b7d31 --- /dev/null +++ b/components/jvcllaz/design/JvDsgnConsts.pas @@ -0,0 +1,711 @@ +{----------------------------------------------------------------------------- +The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/MPL-1.1.html + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The Original Code is: JvDsgnConsts.pas, released on 2003-6-27. + +The Initial Developers of the Original Code is Marcel Bestebroer +Portions created by Marcel Bestebroer are Copyright (C) 2002 - 2003 Project JEDI +All Rights Reserved. + +Contributor(s): - + +You may retrieve the latest version of this file at the Project JEDI's JVCL home page, +located at http://jvcl.delphi-jedi.org + +Known Issues: +-----------------------------------------------------------------------------} +// $Id$ + +unit JvDsgnConsts; + +//{.$I jvcl.inc} + +interface + +{uses + JvConsts;} + +//=== strings used by several editors ======================================== +resourcestring + RsPreviewEllipsis = 'Preview...'; + RsDesignerEllipsis = 'Designer...'; + RsItemsEditorEllipsis = 'Items Editor...'; + RsNone = '(none)'; + RsHelp = 'Help'; + RsConfirm = 'Confirm?'; + {$IFDEF MSWINDOWS} + RsAllFilesFilter = 'All Files (*.*)|*.*'; + {$ENDIF MSWINDOWS} + {$IFDEF UNIX} + RsAllFilesFilter = 'All Files (*)|*'; + {$ENDIF UNIX} + RsNextPage = 'Next Page'; + RsPreviousPage = 'Previous Page'; + RsJVCLActionsCategory = 'JVCL'; + RsJVCLEditActionsCategory = 'JVCL Edit'; + RsJVCLControlActionsCategory = 'JVCL Control'; + RsJVCLDBActionsCategory = 'JVCL DB'; + RsPropertyEditors = '\Property Editors'; + RsJvEditorString = 'Click to edit...'; + RsSystemColors = 'System colors'; + RsStandardColors = 'Standard colors'; + + RsEInvalidPropertyValue = 'Invalid property value'; + +//=== JVCL IDE palettes ====================================================== +resourcestring + RsPaletteSystem = 'Jv System'; + RsPaletteDialog = 'Jv Dialogs'; + RsPaletteButton = 'Jv Buttons'; + RsPaletteEdit = 'Jv Edits'; + RsPaletteCustom = 'Jv Custom'; + RsPaletteBarPanel = 'Jv Bars, Panels'; + RsPaletteLabel = 'Jv Labels'; + RsPaletteListComboTree = 'Jv Lists, Combos, Trees'; + RsPaletteScrollerTracker = 'Jv Scrollers'; + RsPaletteSliderSplitter = 'Jv Trackers, Sliders, Splitters'; + RsPaletteImageAnimator = 'Jv Images, Animators'; + RsPaletteVisual = 'Jv Visual'; + RsPaletteNonVisual = 'Jv Non-Visual'; + RsPaletteThreading = 'Jv Threading'; + RsPalettePersistence = 'Jv Persistence'; + RsPaletteAppForm = 'Jv Application, Forms'; + RsPaletteInterNetWork = 'Jv Internet, Network'; + RsPaletteEncryptCompress = 'Jv Encrypt, Compress'; + RsPaletteDBVisual = 'Jv Data Controls'; + RsPaletteDBNonVisual = 'Jv Data Access'; + RsPaletteHMIComponents = 'Jv HMI'; + RsPaletteBDE = 'Jv BDE'; + RsPalettePrintPreview = 'Jv Print Preview'; + RsPaletteInterpreter = 'Jv Interpreter'; + RsPaletteGlobusComponents1 = 'JVCL Globus 1'; + RsPaletteGlobusComponents2 = 'JVCL Globus 2'; + RsPaletteValidators = 'Jv Validators'; + RsPaletteEDI = 'Jv EDI'; + RsPaletteJans = 'Jv Jans'; + RsPaletteJansSim = 'Jv Jans SIM'; + RsPaletteJansCsv = 'Jv Jans CSV'; + RsPalettePlugin = 'Jv Plugin'; + RsPaletteNavPane = 'Jv NavPane'; + RsPaletteRuntimeDesign = 'Jv Runtime Design'; + RsPaletteMTThreads = 'Jv Threading'; + RsPaletteTimeFramework = 'Jv TimeFrameWork'; + RsPaletteWizard = 'Jv Wizard'; + RsPaletteXPControls = 'Jv XP Controls'; + RsPaletteDocking = 'Jv Docking'; + RsPaletteDotNet = 'Jv DotNet'; + RsPaletteDotNetDB = 'Jv DotNet DB'; + +//=== JvAnimatedEditor.pas =================================================== +resourcestring + RsEditPicture = 'Edit picture...'; + RsLoadAniCursor = 'Load from ANI...'; + +//=== JvAVICaptureEditors.pas ================================================ +resourcestring + RsGetValueFmt = '%d - %s'; + RsDisconnected = 'Disconnected'; + RsEdIsNotWithinTheValidRangeOfdd = '%d is not within the valid range of %d..%d'; + +//=== JvBandObjectDLLWizard.pas ============================================== +resourcestring + RsCreatesABandObjectDLLProject = 'Creates a Band Object DLL Project.'; + RsBandObjectDLLWizard = 'Band Object DLL Wizard'; + RsBandObjectDLLWizardIDString = 'JVCL.JvBandObjectDLLWizard'; + +//=== JvBandObjectDLLWizardForm.pas ========================================== +resourcestring + RsBandHelpCaptionFmt = '%s %s'; + RsEBandNameHasToBeAValidIdentifier = 'Band name has to be a valid identifier!'; + RsEPleaseEnterBandDescription = 'Please enter band description!'; + RsHelpText = sLineBreak + + 'Band Name' + sLineBreak + + 'Enter a band name, e.g. MyBand.' + sLineBreak + + 'This will be the class name of the band object.' + sLineBreak + + 'No need to prefix it with ''T'' as it will be generated.' + sLineBreak + sLineBreak + + 'Description' + sLineBreak + + 'Enter a menuitem text, e.g. &My Band' + sLineBreak + + 'This text will appear in the Explorer Bar or Toolbars menu.' + sLineBreak + sLineBreak + + 'Band Type' + sLineBreak + + 'Select the type of band object to create.'; + +//=== JvBaseDsgnForm.pas ===================================================== +resourcestring + RsBaseDesignFormName = 'JEDI-VCL Editor'; + +//=== JvChangeNotifyEditor.pas =============================================== +resourcestring + RsNotificationsEllipsis = 'Notifications...'; + +//=== JvCheckedItemsForm.pas ================================================= +resourcestring + RsItemEditor = 'Item editor'; + RsEnabled = 'Enabled'; + +//=== JvColorProviderAddDialogForm.pas ======================================= +resourcestring + RsCustomColors = 'Custom colors'; + +//=== JvColorProviderDesignerForm.pas ======================================== +resourcestring + RsCustomColorsEllipsis = 'Custom colors...'; + RsColorMsg = 'Copy standard and system colors from the default context?'; + RsDesigning = 'Designing %s'; + +//=== JvColorProviderEditors.pas ============================================= +resourcestring + RsEMappingDoesNotExistForThisColorProv = 'Mapping does not exist for this color provider.'; + +//=== JvColorProviderEditors.pas ============================================= +resourcestring + RsENoSplashServices = 'Unable to get Borland Splash Services'; + RsENoAboutServices = 'Unable to get Borland About Services'; + + RsAboutDialogTitle = 'JEDI Visual Component Library'; + RsAboutCopyright = 'Copyright the JVCL development team'; + RsAboutTitle = 'JEDI Visual Component Library'; + RsAboutDescription = 'JEDI Visual Component Library http://jvcl.delphi-jedi.org' + sLineBreak + + 'The JVCL is a member of the JEDI Project http://www.delphi-jedi.org' + sLineBreak + + 'Covered under the Mozilla Public License v1.1 (MPL 1.1)' + sLineBreak + + 'License available at http://www.mozilla.org/MPL/MPL-1.1.html'; + RsAboutLicenceStatus = 'MPL 1.1'; + +//=== JvCsvDataEditor.pas ==================================================== +resourcestring + RsJvCsvDataSetSelectCSVFileToOpen = 'JvCsvDataSet - Select CSV File to Open'; + RsCsvFilter = 'CSV files (*.csv)|*.csv'; + +//=== JvCsvDataForm.pas ====================================================== +resourcestring + RsMustTypeAValidFieldNameAndSelectAFi = + 'Must type a valid field name and select a field type. ' + + 'Field name must start with a letter A-Z and consist of letters and numbers only. ' + + 'All field names will be converted to uppercase before being used.'; + RsAddFailed = 'Add Failed'; + RsFieldNameIsNotAValidIdentifier = '%s: Field name is not a valid identifier'; + RsCantAddTwoFieldsWithTheSameNameSele = + 'Can''t add two fields with the same name! Select existing item and click ''Modify'' button to change its properties.'; + RsUpdateFailed = 'Update Failed'; + RsNoItemIsSelectedInTheFieldsListYouC = 'No item is selected in the fields list. You can''t update nothing.'; + RsModifyingTheCurrentlySelectedItemWo = + 'Modifying the currently selected item would create two items with the same name.'; + RsYouHaventActuallyChangedAnythingIfY = 'You haven''t actually changed anything. If you ' + + 'made changes and didn''t click Modify, the changes have ' + + 'not been made yet. (Click no, to go back.) ' + sLineBreak + + 'Are you sure you want to close the CSV Fields editor? '; + +//=== JvDataConsumerContextSelectForm.pas ==================================== +resourcestring + RsEConsumerDoesNotSupportContextSelect = 'Consumer does not support context selection.'; + RsEIJvDataConsumerProviderIsNotSupported = 'IJvDataConsumerProvider is not supported by the specified consumer.'; + +//=== JvDataConsumerItemSelectForm.pas ======================================= +resourcestring + RsDataProviderItemSelector = 'DataProvider Item Selector'; + +//=== JvDataContextManagerForm.pas =========================================== +resourcestring + RsDataProviderContextManager = 'DataProvider Context Manager'; + +//=== JvDataEmbeddedEditor.pas =============================================== +resourcestring + RsLoadFromFileEllipsis = 'Load From File...'; + RsClearEmbeddedData = 'Clear data'; + RsViewEmbeddedDataAsText = 'View As Text...'; + +//=== JvDataProviderDesignerForm.pas ========================================= +resourcestring + RsDefault = ''; + RsDataProviderDesigner = 'DataProvider Designer'; + RsEInternalErrorUnableToRetrieveContext = 'Internal error: unable to retrieve context list'; + +//=== JvDataProviderEditors.pas ============================================== +resourcestring + RsESpecifiedProviderIsNotATComponentDe = 'Specified provider is not a TComponent descendant'; + RsTreeDesignerEllipsis = 'Tree designer...'; + RsContextManagerEllipsis = 'Context manager...'; + RsInvalidVerbd = 'Invalid verb#: %d'; + +//=== JvDataProviderItemDesign.pas =========================================== +resourcestring + RsUnknown = ''; + RsNoItem = ''; + +//=== JvDateTimeForm.pas ===================================================== +resourcestring + RsSelectDate = 'Select Date'; + RsSelectTime = 'Select Time'; + RsSelectDateTime = 'Select Date and Time'; + RsMaxInt = 'MaxInt'; + RsMinInt = 'MinInt'; + RsMaxLong = 'MaxLong'; + RsMinLong = 'MinLong'; + RsMaxShort = 'MaxShort'; + RsMinShort = 'MinShort'; + RsMaxWord = 'MaxWord'; + RsFileName = '(Filename)'; + RsDirectory = '(Directory)'; + +//=== JvDBGridProp.pas ======================================================= +resourcestring + RsEJvDBGridDataSourceNeeded = 'DataSource property must be set before selecting controls.'; + RsEJvDBGridDataSetNeeded = 'A dataset must be linked to the grid datasource before selecting controls.'; + RsJvDBGridAlreadyAdded = 'The field "%s" has already been added.'; + +//=== JvDBMemDatasetEditor.pas =============================================== +resourcestring + RsBorrowStructure = 'Borrow structure...'; + +//=== JvDockPropertyEditors.pas ============================================== +resourcestring + RsDockNewPage = 'Ne&w Page'; + RsDockNextPage = 'Ne&xt Page'; + RsDockPreviousPage = '&Previous Page'; + RsDockDeletePage = '&Delete Page'; + +//=== JvDsgnEditors.pas ====================================================== +resourcestring + RsStripFilePath = '&Strip file path'; + {$IFDEF MSWINDOWS} + RsExecutableFilesExeExeAllFiles = 'Executable files (*.exe)|*.exe|All files (*.*)|*.*'; + {$ENDIF MSWINDOWS} + {$IFDEF UNIX} + RsExecutableFilesExeExeAllFiles = 'Executable files (*)|*'; + {$ENDIF UNIX} + RsFmtEditEllipsis = '%s Editor...'; + RsSaveImageList = 'Save to bitmap...'; + +//=== JvFooterEditor.pas ===================================================== +resourcestring + RsAddButtonText = 'Add button'; + RsMSOffice = 'MS Office 2000'; + RsMSEnterpriseManagerWizard = 'MS Enterprise Manager Wizard'; + RsDialogMode = 'Dialog Mode'; + RsPrevious = 'Previous'; + RsNext = 'Next'; + +//=== JvFormPropertiesForm.pas =============================================== +resourcestring + RsStorageDesigner = 'Form Storage Designer...'; + +//=== JvFullColorListForm.pas ================================================ +resourcestring + RsUnnamedColorFmt = '%s : Unnamed color $%.8x'; + +//=== JvgComponentListEditorForm.pas ========================================= +resourcestring + RsEditComponentListEllipsis = 'Edit component list...'; + +//=== JvgHelpPanelEditor.pas ================================================= +resourcestring + RsRTFAndTextFilesrtftxtrtftxt = 'RTF and Text files (*.rtf,*.txt)|*.rtf;*.txt'; + RsLoadRTFFile = 'Load RTF file'; + RsPreviewRTFText = 'Preview RTF text'; + +//=== JvgLabelEditorForm.pas ================================================= +resourcestring + RsEditLabel = 'Edit &Label...'; + +//=== JvgLogicItemEditorForm.pas ============================================= +resourcestring + RsLogicElements = 'Logic Element: %s'; + RsResult = '[RESULT]'; + RsNotDefined = '[ not defined ]'; + +//=== JvgLogicsEditorForm.pas ================================================ +resourcestring + RsCaption = 'Caption'; + RsComments = 'Comments'; + RsEditComponentEllipsis = 'Edit component...'; + +//=== JvgMultiResourceEditorForm.pas ========================================= +resourcestring + RsCellControlCaption = 'Control'; + RsCellDefaultCaption = 'Default'; + +//=== JvGradientCaptionForm.pas ============================================== +resourcestring + RsCaptionDesigner = 'Edit Captions...'; + RsGradientCaptions = 'Captions'; + +//=== JvgReportEditorForm.pas ================================================ +resourcestring + RsEditReport = 'Edit report...'; + RsPreviewReportEllipsis = 'Preview report...'; + RsDeleteObject = 'Delete object?'; + RsPagePreview = 'Page Preview'; + +//=== JvgReportParamsForm.pas ================================================ +resourcestring + RsEditParamsEllipsis = 'Edit params...'; + +//=== JvGroupHeaderEditor.pas ================================================ +resourcestring + RsStandardFlat = 'Standard/Flat'; + RsWeb = 'Web'; + +//=== JvgShadowEditor.pas ==================================================== +resourcestring + RsUpdateAllEditControl = 'Update all edit control'; + +//=== JVHLEditEditor.pas ===================================================== +resourcestring + RsHLEditorMsg = 'Please select "JvHLEditor" first'; + RsHLEditorMsgTitle = 'Cannot edit'; + RsExecute = 'Execute'; + RsJvHLEdPropDlgIni = 'JvHLEdPropDlg.ini'; + +//=== { TJvIconListForm.pas } ================================================ +resourcestring + RsLoadIcon = 'Load Icon'; + +//=== JvID3v2EditorForm.pas ================================================== +resourcestring + RsfiErrorFrame = 'Error'; + RsfiPaddingFrame = 'Padding'; + RsfiNoFrame = 'No known frame'; + RsfiAudioCrypto = 'Audio encryption'; + RsfiPicture = 'Attached picture'; + RsfiAudioSeekPoint = 'Audio seek point index'; + RsfiComment = 'Comments'; + RsfiCommercial = 'Commercial frame'; + RsfiCryptoReg = 'Encryption method registration'; + RsfiEqualization2 = 'Equalization (2)'; + RsfiEqualization = 'Equalization'; + RsfiEventTiming = 'Event timing codes'; + RsfiGeneralObject = 'General encapsulated object'; + RsfiGroupingReg = 'Group identification registration'; + RsfiInvolvedPeople = 'Involved people list'; + RsfiLinkedInfo = 'Linked information'; + RsfiCDID = 'Music CD identifier'; + RsfiMPEGLookup = 'MPEG location lookup table'; + RsfiOwnership = 'Ownership frame'; + RsfiPrivate = 'Private frame'; + RsfiPlayCounter = 'Play counter'; + RsfiPopularimeter = 'Popularimeter'; + RsfiPositionsync = 'Position synchronisation frame'; + RsfiBufferSize = 'Recommended buffer size'; + RsfiVolumeAdj2 = 'Relative volume adjustment (2)'; + RsfiVolumeAdj = 'Relative volume adjustment'; + RsfiReverb = 'Reverb'; + RsfiSeekFrame = 'Seek frame'; + RsfiSignature = 'Signature frame'; + RsfiSyncedLyrics = 'Synchronized lyric/text'; + RsfiSyncedTempo = 'Synchronized tempo codes'; + RsfiAlbum = 'Album/Movie/Show title'; + RsfiBPM = 'BPM (beats per minute)'; + RsfiComposer = 'Composer'; + RsfiContentType = 'Content type'; + RsfiCopyright = 'Copyright message'; + RsfiDate = 'Date'; + RsfiEncodingTime = 'Encoding time'; + RsfiPlaylistDelay = 'Playlist delay'; + RsfiOrigReleaseTime = 'Original release time'; + RsfiRecordingTime = 'Recording time'; + RsfiReleaseTime = 'Release time'; + RsfiTaggingTime = 'Tagging time'; + RsfiInvolvedPeople2 = 'Involved people list'; + RsfiEncodedBy = 'Encoded by'; + RsfiLyricist = 'Lyricist/Text writer'; + RsfiFileType = 'File type'; + RsfiTime = 'Time'; + RsfiContentGroup = 'Content group description'; + RsfiTitle = 'Title/songname/content description'; + RsfiSubTitle = 'Subtitle/Description refinement'; + RsfiInitialKey = 'Initial key'; + RsfiLanguage = 'Language(s)'; + RsfiSongLen = 'Length'; + RsfiMusicianCreditList = 'Musician credits list'; + RsfiMediaType = 'Media type'; + RsfiMood = 'Mood'; + RsfiOrigAlbum = 'Original album/movie/show title'; + RsfiOrigFileName = 'Original filename'; + RsfiOrigLyricist = 'Original lyricist(s)/text writer(s)'; + RsfiOrigArtist = 'Original artist(s)/performer(s)'; + RsfiOrigYear = 'Original release year'; + RsfiFileOwner = 'File owner/licensee'; + RsfiLeadArtist = 'Lead performer(s)/Soloist(s)'; + RsfiBand = 'Band/orchestra/accompaniment'; + RsfiConductor = 'Conductor/performer refinement'; + RsfiMixArtist = 'Interpreted, remixed, or otherwise modified by'; + RsfiPartInSet = 'Part of a set'; + RsfiProducedNotice = 'Produced notice'; + RsfiPublisher = 'Publisher'; + RsfiTrackNum = 'Track number/Position in set'; + RsfiRecordingDates = 'Recording dates'; + RsfiNetRadioStation = 'Internet radio station name'; + RsfiNetRadioOwner = 'Internet radio station owner'; + RsfiSize = 'Size'; + RsfiAlbumSortOrder = 'Album sort order'; + RsfiPerformerSortOrder = 'Performer sort order'; + RsfiTitleSortOrder = 'Title sort order'; + RsfiISRC = 'ISRC (international standard recording code)'; + RsfiEncoderSettings = 'Software/Hardware and settings used for encoding'; + RsfiSetSubTitle = 'Set subtitle'; + RsfiUserText = 'User defined text information'; + RsfiYear = 'Year'; + RsfiUniqueFileID = 'Unique file identifier'; + RsfiTermsOfUse = 'Terms of use'; + RsfiUnsyncedLyrics = 'Unsynchronized lyric/text transcription'; + RsfiWWWCommercialInfo = 'Commercial information'; + RsfiWWWCopyright = 'Copyright/Legal information'; + RsfiWWWAudioFile = 'Official audio file webpage'; + RsfiWWWArtist = 'Official artist/performer webpage'; + RsfiWWWAudioSource = 'Official audio source webpage'; + RsfiWWWRadioPage = 'Official internet radio station homepage'; + RsfiWWWPayment = 'Payment'; + RsfiWWWPublisher = 'Official publisher webpage'; + RsfiWWWUser = 'User defined URL link'; + RsfiMetaCrypto = 'Encrypted meta frame'; + RsfiMetaCompression = 'Compressed meta frame'; + + RsMPEG10 = 'MPEG 1.0'; + RsMPEG20 = 'MPEG 2.0'; + RsMPEGUnknown = '??'; + RsMPEG25 = 'MPEG 2.5'; + + RsLayerUnknown = '??'; + RsLayer1 = 'Layer 1'; + RsLayer2 = 'Layer 2'; + RsLayer3 = 'Layer 3'; + + RsChannelModeStereo = 'Stereo'; + RsChannelModeJointStereo = 'Joint Stereo'; + RsChannelModeDualChannel = 'Dual Channel'; + RsChannelModeMono = 'Mono'; + + RsEmphasisNone = 'None'; + RsEmphasisMicrosec = '50/15 microsec'; + RsEmphasisUnknown = '??'; + RsEmphasisCCITTJ17 = 'CCIT J.17'; + + RsBoolNo = 'No'; + RsBoolYes = 'Yes'; + + RsVbrNo = ''; + RsVbrVbr = ' (VBR)'; + + RsIDV2FileInfoFmt = + 'Size: %d bytes' + sLineBreak + + 'Header found at: %d bytes' + sLineBreak + + 'Length: %d seconds' + sLineBreak + + '%s %s' + sLineBreak + + '%dkbit%s, %d frames' + sLineBreak + + '%dHz %s' + sLineBreak + + 'CRCs: %s' + sLineBreak + + 'Copyrighted: %s' + sLineBreak + + 'Original: %s' + sLineBreak + + 'Emphasis: %s'; + + RsIDV2FileInfoCaption = 'File info'; + RsCommit = 'Commit?'; + + // (rom) from JvConsts.pas + RsID3CommitTag = '&Commit'; + RsID3FileInfoTag = 'File &info'; + RsID3FrameEditorTag = 'Frame edi&tor'; + RsID3RemoveTag = '&Remove tag...'; + RsID3RemoveTagConfirmation = 'Remove tag?'; + RsID3Err_FileDoesNotExists = 'File %s does not exists'; + RsID3Err_NoFileSpecified = 'No file specified'; + RsID3Err_NoValidMPEGTag = 'This file has not a valid MPEG tag'; + +//=== JvIDEZoom.pas ========================================================== +resourcestring + RsZoomEditWindow = 'Zoom Edit Window'; + RsCantZoomDocked = 'An edit window can not be zoomed while docked,' + sLineBreak + + 'switch to the "Classic Undocked" layout to use this command'; + +//=== JvImagePreviewForm.pas ================================================= +resourcestring + RsPreview = 'Preview'; + +//=== JvJVCLAboutEditor.pas ================================================== +resourcestring + RsVersions = 'Version %s'; + +//=== JvLookoutEditor.pas ==================================================== +resourcestring + RsAddPage = 'Add page'; + RsActivate = 'Activate'; + RsAddButton = 'Add Button'; + RsScrollUp = 'Scroll Up'; + RsScrollDown = 'Scroll Down'; + RsAddPage_ = 'Add Page'; + +//=== JvMailEditor.pas ======================================================= +resourcestring + RsSend = 'Send'; + RsAddress = 'Address'; + +//=== JvOutlookBarEditors.pas ================================================ +resourcestring + RsOLEditor = 'OutlookBar Editor...'; + +//=== JvOutlookBarForm.pas =================================================== +resourcestring + RsDesignerIsNilInFormClosed = 'Designer is nil in FormClosed'; + RsFmtCaption = 'Editing %s'; + RsOutlookBarCaption = 'OutlookBar Editor'; + +//=== JvPageLinkEditor.pas =================================================== +resourcestring + RsCreateLinkToPaged = 'Create link to page %d'; + +//=== JvPageListTreeViewReg.pas ============================================== +resourcestring + RsEFmtInterfaceNotSupported = '%s does not support the required interface (%s)'; + RsPageListEditorEllipsis = 'Page List Editor...'; + RsNextPageAmp = 'Ne&xt Page'; + RsPrevPage = '&Previous Page'; + RsNewPage = '&New Page'; + RsDelPage = '&Delete Page'; + +//=== JvPageManagerForm.pas ================================================== +resourcestring + RsProxyEditor = 'Edit Proxies...'; + RsPageProxies = '%s Page Proxies'; + RsProxyName = 'Page Proxy Name'; + RsPageName = 'Page Name'; + +//=== JvPatcherEditor.pas ==================================================== +resourcestring + RsDiff = '(diff)'; + RsEqual = '(equal)'; + +//=== JvPictureEditForm.pas ================================================== +resourcestring + RsLoadPicture = 'Load picture'; + RsSavePictureAs = 'Save picture as'; + +//=== JvPluginParamsForm.pas ================================================= +resourcestring + RsPluginParamsFormInfoText = + 'The settings above will create the following project:' + + sLineBreak + sLineBreak + + '* A project called Plg%0:s.%1:s' + sLineBreak + + '* A unit called Plugin%0:s, containing the data module T%0:s.'; + +//=== JvPluginWizard.pas ===================================================== +resourcestring + RsJvPluginWizard = 'Jv Plugin Wizard'; + RsProjects = 'Projects'; + RsNewPlugin = 'New Plugin'; + RsPrivateDeclarations = '{ Private declarations }'; + RsPublicDeclarations = '{ Public declarations }'; + RsIMPORTANTNOTEIfYouChangeTheNameOfTh = + '// IMPORTANT NOTE: If you change the name of the Plugin container,' + sLineBreak + + '// you must set the type below to the same type. (Delphi changes' + sLineBreak + + '// the declaration, but not the procedure itself. Both the return' + sLineBreak + + '// type and the type created must be the same as the declared type above.'; + RsJediPluginWizard = 'JEDI Plugin Wizard'; + RsPluginWizardIDString = 'JVCL.JvPluginWizard'; + +//=== JvPreviewReg.pas ======================================================= +resourcestring + RsCreatePreview = 'Create Preview'; + RsClearPreview = 'Clear Preview'; + +//=== JvScheduleEditorForm.pas =============================================== +resourcestring + RsEInvalidScheduleSettingsFound = 'Invalid schedule settings found.'; + RsStop = 'Stop'; + RsRun = 'Run'; + +//=== JvScheduleEditors.pas ================================================== +resourcestring + RsEventEditor = 'Event editor...'; + +//=== JvScrollMaxEditor.pas ================================================== +resourcestring + RsAddBand = 'Add Band'; + +//=== JvSegmentedLEDDisplayEditors.pas ======================================= +resourcestring + RsAddDigit = 'Add digit'; + RsRemoveDigit = 'Remove digit'; + RsEditMappingEllipsis = 'Edit mapping...'; + +//=== JvSegmentedLEDDisplayMappingForm.pas =================================== +resourcestring + RsSegmentedLEDDisplayMappingEditor = 'Segmented LED Display Mapping Editor'; + +//=== JvSegmentedLEDDisplayMappingForm.pas =================================== +resourcestring + {$IFDEF MSWINDOWS} + RsTextFilter = + 'Text files (*.TXT)|*.TXT|Config files (*.SYS;*.INI)|*.SYS;*.INI|Batch files (*.BAT)|*.BAT|All files (*.*)|*.*'; + // RsTextFilter = 'Text files (*.txt)|*.txt|Config files (*.sys;*.ini)|*.sys;*.ini|Batch files (*.bat)|*.bat|All files (*.*)|*.*'; + {$ENDIF MSWINDOWS} + {$IFDEF UNIX} + RsTextFilter = + 'Text files (*.txt)|*.txt|All files (*)|*'; + {$ENDIF UNIX} + RsSingleLine = 'Line'; + RsMultipleLines = 'Lines'; + +//=== { TJvSpeedbarForm.pas } ================================================ + RsESBItemNotCreate = 'Cannot create a new Speedbar button'; + RsConfirmSBDelete = 'Are you sure you want to delete current section?'; + RsSpeedbarDesigner = 'Speedbar designer...'; + RsNewSectionName = 'Untitled (%d)'; + +//=== JvTimeFrameworkReg.pas ================================================= +resourcestring + RsGridLayout = 'Grid Layout'; + RsCustomDraw = 'Custom Draw'; + +//=== JvTimerListEditor.pas ================================================== +resourcestring + RsEventsEllipsis = 'Events...'; + +//=== JvTreeItemsEditorForm.pas ============================================== +resourcestring + RsLinksEditorEllipsis = 'Links Editor...'; + +//=== JvValidatorsEditorForm.pas ============================================= +resourcestring + RsJvValidatorsItemsEditorEllipsis = 'JvValidators Items Editor...'; + RsJvValidatorItemsEditorEllipsis = 'JvValidator Items Editor...'; + +//=== JvWizardEditorForm.pas ================================================= +resourcestring + RsPageListEllipsis = 'Page List...'; + RsNewWelcomePage = 'New Welcome Page'; + RsNewInteriorPage = 'New Interior Page'; + RsDeletePage = 'Delete Page'; + +//=== JvXPPropertyEditors.pas ================================================ +resourcestring + RsItemEditorEllipsis = 'Item Editor...'; + RsDefaultColorItem = 'Restore Default Colors'; + RsDefaultFontsItem = 'Restore Default Fonts'; + +//=== DataProvider design time constants ===================================== +resourcestring + RsDataProviderDesignerCaption = 'Editing %s%s...'; + RsDataProviderContextManCaption = 'Editing contexts for ''%s''...'; + RsDataItemRootID = 'ROOT'; + RsDataItemRootCaption = 'Root'; + RsDataItemNoTextIntf = 'Item has no text support.'; + RsDataItemIDNotFound = 'Item ID "%s" not found!'; + RsEDataItemNotFound = 'Item not found.'; + RsEDataProviderAddFailed = 'Failed to add a new item.'; + RsEDataProviderAddErrorReason = 'unable to add new item; %s.'; + RsEDataProviderDeleteErrorReason = 'Unable to delete item; %s.'; + RsEDataProviderNoManOrDsgn = 'neither IJvDataItemsManagement nor IJvDataItemsDesigner are supported'; + RsEDataProviderNoSubItems = 'item does not support IJvDataItems'; + RsEDataProviderNoMan = 'IJvDataItemsManagement is not supported'; + +//=== not taken into JVCL ==================================================== + +implementation + +end. diff --git a/components/jvcllaz/design/JvHTHintForm.lfm b/components/jvcllaz/design/JvHTHintForm.lfm new file mode 100644 index 000000000..9fb3ce611 --- /dev/null +++ b/components/jvcllaz/design/JvHTHintForm.lfm @@ -0,0 +1,88 @@ +object JvHintEditor: TJvHintEditor + Left = 200 + Height = 240 + Top = 108 + Width = 320 + BorderIcons = [biSystemMenu] + Caption = 'JvHtHint Editor' + ClientHeight = 240 + ClientWidth = 320 + Color = clBtnFace + Constraints.MinHeight = 150 + Constraints.MinWidth = 200 + Icon.Data = { + 3E01000000000100010010101000010010002801000016000000280000001000 + 0000200000000100040000000000C00000000000000000000000000000000000 + 000000000000000080000080000000808000800000008000800080800000C0C0 + C000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF + FF00000000000000000000000BBBB0000000000BB000BB000000000BB0000B00 + 0000000BBB000BB00000000BBB000BB00000000000000BB00000000000000BB0 + 0000000000000BB00000000000000BB00000000000000BB00000000000000BB0 + 0000000000000BB0000000000000BBBB00000000000BBBBBB000000000000000 + 0000FFFF0000F87F0000E73F0000E7BF0000E39F0000E39F0000FF9F0000FF9F + 0000FF9F0000FF9F0000FF9F0000FF9F0000FF9F0000FF0F0000FE070000FFFF + 0000 + } + KeyPreview = True + Position = poScreenCenter + ShowHint = True + LCLVersion = '1.7' + object Label1: TLabel + Left = 8 + Height = 15 + Top = 8 + Width = 23 + Caption = 'Hint' + ParentColor = False + ParentFont = False + end + object HintLabel: TLabel + Left = 114 + Height = 15 + Top = 8 + Width = 198 + Alignment = taRightJustify + Anchors = [akTop, akRight] + Caption = 'Drag mouse over this label to see hint' + ParentColor = False + ParentFont = False + WordWrap = True + end + object HintMemo: TMemo + Left = 8 + Height = 157 + Top = 32 + Width = 304 + Anchors = [akTop, akLeft, akRight, akBottom] + OnChange = HintMemoChange + OnKeyDown = HintMemoKeyDown + ParentFont = False + ScrollBars = ssBoth + TabOrder = 0 + WordWrap = False + end + object BtnOk: TButton + Left = 151 + Height = 25 + Top = 204 + Width = 75 + Anchors = [akRight, akBottom] + Caption = '&OK' + Default = True + ModalResult = 1 + ParentFont = False + TabOrder = 1 + end + object BtnCancel: TButton + Left = 237 + Height = 25 + Top = 204 + Width = 75 + Anchors = [akRight, akBottom] + Cancel = True + Caption = 'Cancel' + ModalResult = 2 + ParentFont = False + TabOrder = 2 + end +end diff --git a/components/jvcllaz/design/JvHTHintForm.pas b/components/jvcllaz/design/JvHTHintForm.pas new file mode 100644 index 000000000..ad5d523fa --- /dev/null +++ b/components/jvcllaz/design/JvHTHintForm.pas @@ -0,0 +1,106 @@ +{----------------------------------------------------------------------------- +The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/MPL-1.1.html + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The Original Code is: JvHTHintEditor.PAS, released on 2002-07-04. + +The Initial Developers of the Original Code are: Andrei Prygounkov +Copyright (c) 1999, 2002 Andrei Prygounkov +All Rights Reserved. + +Contributor(s): + +You may retrieve the latest version of this file at the Project JEDI's JVCL home page, +located at http://jvcl.delphi-jedi.org + +description : Design-time Hint Editor + +Known Issues: +-----------------------------------------------------------------------------} +// $Id$ + +unit JvHTHintForm; + +{$mode objfpc}{$H+} + +interface + +uses + SysUtils, Classes, Controls, Forms, StdCtrls, + PropEdits, + JvHint; + +type + TJvHintEditor = class(TForm) + HintMemo: TMemo; + Label1: TLabel; + BtnOk: TButton; + BtnCancel: TButton; + HintLabel: TLabel; + procedure HintMemoChange(Sender: TObject); + procedure HintMemoKeyDown(Sender: TObject; var Key: Word; + {%H-}Shift: TShiftState); + private + public + end; + + TJvHintProperty = class(TStringProperty) + public + function GetAttributes: TPropertyAttributes; override; + procedure Edit; override; + end; + +implementation + +{$R *.lfm} + +//=== { TJvHintProperty } ==================================================== + +procedure TJvHintProperty.Edit; +var + OldHintWindowClass: THintWindowClass; +begin + OldHintWindowClass := HintWindowClass; + with TJvHintEditor.Create(Application) do + try + HintMemo.Text := GetValue; + HintWindowClass := TJvHTHintWindow; + HintMemoChange(nil); + if ShowModal = mrOk then + SetValue(HintMemo.Text); + finally + Free; + HintWindowClass := OldHintWindowClass; + { recreate hint window } + Application.ShowHint := not Application.ShowHint; + Application.ShowHint := not Application.ShowHint; + end; +end; + +function TJvHintProperty.GetAttributes: TPropertyAttributes; +begin + Result := inherited GetAttributes + [paDialog]; +end; + +//=== { TJvHintEditor } ====================================================== + +procedure TJvHintEditor.HintMemoChange(Sender: TObject); +begin + HintLabel.Hint := HintMemo.Text; +end; + +procedure TJvHintEditor.HintMemoKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + //if Key = VK_ESCAPE then + if Ord(Key) = 27 then //asn: With VisualCLX VK_ESCAPE <> 27 + BtnCancel.Click; +end; + +end. diff --git a/components/jvcllaz/design/JvValidatorsEditorForm.lfm b/components/jvcllaz/design/JvValidatorsEditorForm.lfm new file mode 100644 index 000000000..bd9ad6262 --- /dev/null +++ b/components/jvcllaz/design/JvValidatorsEditorForm.lfm @@ -0,0 +1,269 @@ +object frmValidatorsEditor: TfrmValidatorsEditor + Left = 289 + Height = 260 + Top = 205 + Width = 320 + BorderIcons = [biSystemMenu] + Caption = 'JvValidator Items Editor' + ClientHeight = 260 + ClientWidth = 320 + Color = clBtnFace + Constraints.MinHeight = 260 + Constraints.MinWidth = 160 + OnClose = FormClose + OnCreate = FormCreate + PopupMenu = popForm + ShowHint = True + LCLVersion = '1.6.0.4' + object ToolBar1: TToolBar + Left = 0 + Height = 24 + Top = 0 + Width = 320 + AutoSize = True + Caption = 'ToolBar1' + EdgeBorders = [ebLeft, ebBottom] + Images = il16 + TabOrder = 0 + object btnNew: TToolButton + Left = 3 + Hint = 'Add Required Field Validator' + Top = 0 + Caption = 'Required Field Validator' + DropdownMenu = popNew + ImageIndex = 0 + Style = tbsDropDown + end + object btnDelete: TToolButton + Left = 38 + Top = 0 + Action = acDelete + end + object ToolButton1: TToolButton + Left = 61 + Height = 22 + Top = 0 + Width = 8 + Caption = 'ToolButton1' + ImageIndex = 2 + Style = tbsSeparator + end + object ToolButton2: TToolButton + Left = 69 + Top = 0 + Action = acMoveUp + end + object ToolButton3: TToolButton + Left = 92 + Top = 0 + Action = acMoveDown + end + end + object StatusBar1: TStatusBar + Left = 0 + Height = 23 + Top = 237 + Width = 320 + AutoHint = True + Panels = < + item + Width = 50 + end> + end + object lbValidators: TListBox + Left = 0 + Height = 213 + Top = 24 + Width = 320 + Align = alClient + ItemHeight = 0 + OnClick = lbValidatorsClick + TabOrder = 2 + end + object popNew: TPopupMenu + Images = il16 + left = 16 + top = 40 + end + object alEditor: TActionList + Images = il16 + OnUpdate = alEditorUpdate + left = 16 + top = 104 + object acDelete: TAction + Caption = 'Delete' + Hint = 'Delete selected item' + ImageIndex = 1 + OnExecute = acDeleteExecute + ShortCut = 46 + end + object acMoveUp: TAction + Caption = 'Move Up' + Hint = 'Move Up' + ImageIndex = 2 + OnExecute = acMoveUpExecute + ShortCut = 16422 + end + object acMoveDown: TAction + Caption = 'Move Down' + Hint = 'Move Down' + ImageIndex = 3 + OnExecute = acMoveDownExecute + ShortCut = 16424 + end + end + object il16: TImageList + left = 16 + top = 72 + Bitmap = { + 4C69040000001000000010000000000000000000000000000000848484FFFFFF + FFFF000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000FFFFFF0000000000000000848484FF00FF + FFFF0000000000000000848484FF000000000000000000000000000000000000 + 0000000000000000000000000000848484FF00FFFFFF00000000848484FFFFFF + FFFF00000000848484FF00FFFFFF000000000000000000000000000000000000 + 000000000000000000000000000000000000848484FF00FFFFFF848484FF00FF + FFFF848484FF00FFFFFF00000000000000000000000000000000000000000000 + 0000000000000000000000000000FFFFFFFF00FFFFFF848484FF00FFFFFFFFFF + FFFF848484FF848484FF848484FF848484FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF00000000848484FF848484FF848484FFFFFFFFFF8484 + 84FFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FF + FFFFFFFFFFFF000000FF848484FF00000000848484FFFFFFFFFF848484FF00FF + FFFF848484FF00FFFFFFFFFFFFFF00FFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFF + FFFF00FFFFFF000000FF848484FF848484FF00FFFFFF00FFFFFF848484FFFFFF + FFFF00FFFFFF848484FF00FFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FF + FFFFFFFFFFFF000000FF848484FFFFFFFFFF000000FFFFFFFFFF848484FF00FF + FFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFF + FFFF00FFFFFF000000FF848484FF00000000000000FF00FFFFFFFFFFFFFF00FF + FFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF000000FF000000FF0000 + 00FF000000FF000000FF848484FF00000000000000FFFFFFFFFF00FFFFFFFFFF + FFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFF000000FF00FFFFFFC6C6 + C6FF000000FF000000FF848484FF00000000000000FF00FFFFFFFFFFFFFF00FF + FFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF000000FFC6C6C6FF0000 + 00FFFFFFFFFF000000FF848484FF00000000000000FFFFFFFFFF00FFFFFFFFFF + FFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFF000000FF000000FFFFFF + FFFF00FFFFFF000000FF848484FF00000000000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF848484FF0000000000000000848484FF848484FF8484 + 84FF848484FF848484FF848484FF848484FF848484FF848484FF848484FF8484 + 84FF848484FF848484FF848484FF000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000084FF000084FF848484FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000084FF000084FF848484FF000000000000000000000000000000000000 + 0000000000000000000000000000000084FF000084FF848484FF000000000000 + 84FF000084FF848484FF00000000000000000000000000000000000000000000 + 0000000000000000000000000000848484FF000084FF000084FF000084FF0000 + 84FF848484FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF0000000000000000848484FF000084FF000084FF0000 + 84FFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FF + FFFFFFFFFFFF000000FF848484FF00000000848484FF000084FF000084FF0000 + 84FF000084FFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFF + FFFF00FFFFFF000000FF848484FF00000000000084FF000084FF848484FF00FF + FFFF000084FF000084FFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FF + FFFFFFFFFFFF000000FF848484FF848484FF000084FF848484FF00FFFFFFFFFF + FFFF848484FF000084FF848484FFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFF + FFFF00FFFFFF000000FF848484FF000084FF000084FF00FFFFFFFFFFFFFF00FF + FFFFFFFFFFFF848484FF000084FF00FFFFFFFFFFFFFF000000FF000000FF0000 + 00FF000000FF000000FF848484FF000084FF000000FFFFFFFFFF00FFFFFFFFFF + FFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFF000000FF00FFFFFFC6C6 + C6FF000000FF000000FF848484FF848484FF000000FF00FFFFFFFFFFFFFF00FF + FFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF000000FFC6C6C6FF0000 + 00FFFFFFFFFF000000FF848484FF00000000000000FFFFFFFFFF00FFFFFFFFFF + FFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFF000000FF000000FFFFFF + FFFF00FFFFFF000000FF848484FF00000000000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF848484FF0000000000000000848484FF848484FF8484 + 84FF848484FF848484FF848484FF848484FF848484FF848484FF848484FF8484 + 84FF848484FF848484FF848484FF000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000FF000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FF848400FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF848400FF848400FF848400FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00FF848400FF848400FF848400FF848400FF848400FF000000FF000000000000 + 0000000000000000000000000000000000000000000000000000000000FF8484 + 00FF848400FF848400FF848400FF848400FF848400FF848400FF000000FF0000 + 00000000000000000000000000000000000000000000000000FF000000FF0000 + 00FF000000FF848400FF848400FF848400FF000000FF000000FF000000FF0000 + 00FF000000000000000000000000000000000000000000000000000000000000 + 0000000000FF848400FF848400FF848400FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF848400FF848400FF848400FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF848400FF848400FF848400FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF000000FF000000FF000000FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF000000FF000000FF000000FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF848400FF848400FF848400FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF848400FF848400FF848400FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF848400FF848400FF848400FF000000FF00000000000000000000 + 00000000000000000000000000000000000000000000000000FF000000FF0000 + 00FF000000FF848400FF848400FF848400FF000000FF000000FF000000FF0000 + 00FF000000000000000000000000000000000000000000000000000000FF8484 + 00FF848400FF848400FF848400FF848400FF848400FF848400FF000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00FF848400FF848400FF848400FF848400FF848400FF000000FF000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF848400FF848400FF848400FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FF848400FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000FF000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000 + } + end + object popForm: TPopupMenu + left = 96 + top = 96 + object N1: TMenuItem + Caption = '-' + end + object Delete1: TMenuItem + Action = acDelete + end + object N2: TMenuItem + Caption = '-' + end + object MoveUp1: TMenuItem + Action = acMoveUp + end + object MoveDown1: TMenuItem + Action = acMoveDown + end + end +end diff --git a/components/jvcllaz/design/JvValidatorsEditorForm.pas b/components/jvcllaz/design/JvValidatorsEditorForm.pas new file mode 100644 index 000000000..b382b93da --- /dev/null +++ b/components/jvcllaz/design/JvValidatorsEditorForm.pas @@ -0,0 +1,577 @@ +{----------------------------------------------------------------------------- +The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/MPL-1.1.html + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The Original Code is: JvValidatorsEditorForm.PAS, released on 2003-01-01. + +The Initial Developer of the Original Code is Peter Thörnqvist [peter3 att users dott sourceforge dott net] . +Portions created by Peter Thörnqvist are Copyright (C) 2003 Peter Thörnqvist. +All Rights Reserved. + +Contributor(s): + +You may retrieve the latest version of this file at the Project JEDI's JVCL home page, +located at http://jvcl.delphi-jedi.org + +Known Issues: +-----------------------------------------------------------------------------} +// $Id$ + +unit JvValidatorsEditorForm; + +interface + +uses + SysUtils, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, Menus, ActnList, + ComponentEditors, PropEdits, + JvValidators; + +type + + { TfrmValidatorsEditor } + + TfrmValidatorsEditor = class(TForm) + ToolBar1: TToolBar; + btnNew: TToolButton; + btnDelete: TToolButton; + StatusBar1: TStatusBar; + lbValidators: TListBox; + popNew: TPopupMenu; + alEditor: TActionList; + acDelete: TAction; + il16: TImageList; + ToolButton1: TToolButton; + ToolButton2: TToolButton; + ToolButton3: TToolButton; + acMoveUp: TAction; + acMoveDown: TAction; + popForm: TPopupMenu; + N1: TMenuItem; + Delete1: TMenuItem; + N2: TMenuItem; + MoveUp1: TMenuItem; + MoveDown1: TMenuItem; + procedure alEditorUpdate({%H-}AAction: TBasicAction; var {%H-}Handled: Boolean); + procedure FormClose(Sender: TObject; var AAction: TCloseAction); + procedure acDeleteExecute(Sender: TObject); + procedure lbValidatorsClick(Sender: TObject); + procedure acMoveUpExecute(Sender: TObject); + procedure acMoveDownExecute(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + FDesigner: TComponentEditorDesigner; + FValidator: TJvValidators; + FFilling: Boolean; + function AddExisting(Validator: TJvBaseValidator): Integer; overload; + function AddNew(ValidatorClass: TJvBaseValidatorClass): Integer; overload; + procedure Delete(Index: Integer); + procedure ClearValidators; + procedure SelectItem(AObject: TPersistent); + procedure UpdateItem(Index: Integer); + procedure UpdateCaption; + procedure SetValidator(const Value: TJvValidators); + procedure DoAddNewValidator(Sender: TObject); + procedure AddValidatorClasses; + protected + procedure ItemDeleted(Item: TPersistent); + procedure OnComponentRenamed(AComponent: TComponent); + procedure OnGetSelection(const ASelection: TPersistentSelectionList); + procedure OnSetSelection(const ASelection: TPersistentSelectionList); + public + constructor Create(TheOwner: TComponent); override; + destructor Destroy; override; + procedure Activated; + property Validator: TJvValidators read FValidator write SetValidator; + property Designer: TComponentEditorDesigner read FDesigner write FDesigner; + end; + + TJvValidatorEditor = class(TComponentEditor) + public + function GetVerb({%H-}Index: Integer): string; override; + function GetVerbCount: Integer; override; + procedure ExecuteVerb(Index: Integer); override; + end; + + TJvPropertyValidateProperty = class(TStringProperty) + public + function GetAttributes: TPropertyAttributes; override; + procedure GetValues(Proc: TGetStrProc); override; + end; + + TJvPropertyToCompareProperty = class(TStringProperty) + public + function GetAttributes: TPropertyAttributes; override; + procedure GetValues(Proc: TGetStrProc); override; + end; + +implementation + +uses + TypInfo, + {JvErrorIndicator,} JvDsgnConsts; + +{$R *.lfm} + +const + ValidKinds: TTypeKinds = + [tkInteger, tkChar, tkEnumeration, tkFloat, tkString, tkSet, + tkWChar, tkLString, tkUString, tkWString, tkAString, tkVariant, tkInt64]; + +procedure ShowEditor(ADesigner: TComponentEditorDesigner; AValidator: TJvValidators); +var + I: Integer; + AEditor: TfrmValidatorsEditor; +begin + // because the page list editor is not show modal, so + // we need to find it rather than create a new instance. + AEditor := nil; + for I := 0 to Screen.FormCount - 1 do + if Screen.Forms[I] is TfrmValidatorsEditor then + if TfrmValidatorsEditor(Screen.Forms[I]).Validator = AValidator then + begin + AEditor := TfrmValidatorsEditor(Screen.Forms[I]); + Break; + end; + // Show the wizard editor + if Assigned(AEditor) then + begin + AEditor.Show; + if AEditor.WindowState = wsMinimized then + AEditor.WindowState := wsNormal; + end + else + begin + AEditor := TfrmValidatorsEditor.Create(Application); + try + AEditor.Designer := ADesigner; + AEditor.Validator := AValidator; + AEditor.Show; + except + AEditor.Free; + raise; + end; + end; +end; + +//=== { TJvValidatorEditor } ================================================= + +procedure TJvValidatorEditor.ExecuteVerb(Index: Integer); +begin + if (Index = 0) and (Component is TJvValidators) then + ShowEditor(Designer, TJvValidators(Component)) + else + inherited ExecuteVerb(Index); +end; + +function TJvValidatorEditor.GetVerb(Index: Integer): string; +begin + Result := RsJvValidatorsItemsEditorEllipsis; +end; + +function TJvValidatorEditor.GetVerbCount: Integer; +begin + Result := 1; +end; + +//== TfrmValidatorsEditor ==================================================== + +procedure TfrmValidatorsEditor.FormCreate(Sender: TObject); +begin + AddValidatorClasses; +end; + +procedure TfrmValidatorsEditor.Activated; +var + I: Integer; + Index: Integer; +begin + if FFilling then + Exit; + FFilling := True; + try + Index := lbValidators.ItemIndex; + lbValidators.Items.BeginUpdate; + try + ClearValidators; + if FValidator <> nil then + for I := 0 to FValidator.Count - 1 do + AddExisting(FValidator.Items[I]); + + if lbValidators.Items.Count = 0 then + Index := -1 + else + if (Index >= lbValidators.Items.Count) then + Index := 0; + lbValidators.ItemIndex := Index; + finally + lbValidators.Items.EndUpdate; + end; + finally + FFilling := False; + end; +end; + +procedure TfrmValidatorsEditor.ItemDeleted(Item: TPersistent); +var + I, J: Integer; +begin + if not (csDestroying in ComponentState) then + begin + if Item = Validator then + begin + Validator := nil; + ClearValidators; + Close; + end + else + begin + lbValidators.Items.BeginUpdate; + try + for I := 0 to lbValidators.Items.Count - 1 do + if Item = lbValidators.Items.Objects[I] then + begin + J := lbValidators.ItemIndex; + lbValidators.Items.Delete(I); + if lbValidators.ItemIndex < 0 then + lbValidators.ItemIndex := J - 1; + Exit; + end; + finally + lbValidators.Items.EndUpdate; + end; + end; + UpdateCaption; + end; +end; + +procedure TfrmValidatorsEditor.OnComponentRenamed(AComponent: TComponent); +var + I: Integer; +begin + I := lbValidators.Items.IndexOfObject(AComponent); + if I >= 0 then + lbValidators.Items[I] := AComponent.Name; +end; + +procedure TfrmValidatorsEditor.OnGetSelection( + const ASelection: TPersistentSelectionList); +begin + if not Assigned(ASelection) then + Exit; + if ASelection.Count > 0 then + ASelection.Clear; + if lbValidators.ItemIndex >= 0 then + ASelection.Add(TPersistent(lbValidators.Items.Objects[lbValidators.ItemIndex])); +end; + +procedure TfrmValidatorsEditor.OnSetSelection( + const ASelection: TPersistentSelectionList); +begin + if Assigned(ASelection) then + if ASelection.Count > 0 then + lbValidators.ItemIndex := lbValidators.Items.IndexOfObject(ASelection.Items[0]) + else + lbValidators.ItemIndex := -1; +end; + +procedure TfrmValidatorsEditor.UpdateItem(Index: Integer); +var + I: Integer; +begin + with lbValidators do + if (Index < 0) or (Index >= Items.Count) then + for I := 0 to Items.Count - 1 do + Items[I] := TComponent(Items.Objects[I]).Name + else + Items[Index] := TComponent(Items.Objects[Index]).Name; +end; + +function TfrmValidatorsEditor.AddExisting(Validator: TJvBaseValidator): Integer; +begin + Result := lbValidators.Items.AddObject(Validator.Name, Validator); + Designer.PropertyEditorHook.PersistentAdded(Validator, True); + if not FFilling then + begin + lbValidators.ItemIndex := Result; + lbValidatorsClick(nil); + end; +end; + +function TfrmValidatorsEditor.AddNew(ValidatorClass: TJvBaseValidatorClass): Integer; +var + V: TJvBaseValidator; +begin + V := ValidatorClass.Create(FValidator.Owner); + try + V.Name := Designer.UniqueName(V.ClassName); + FValidator.Insert(V); + Result := AddExisting(V); + except + V.Free; + raise; + end; +end; + +procedure TfrmValidatorsEditor.ClearValidators; +begin + lbValidators.Items.Clear; +end; + +procedure TfrmValidatorsEditor.Delete(Index: Integer); +var + V: TJvBaseValidator; +begin + with lbValidators do + if (Index > -1) and (Index < Items.Count) then + begin + V := TJvBaseValidator(Items.Objects[Index]); + FValidator.Remove(V); + V.Free; + Designer.Modified; + end; +end; + +procedure TfrmValidatorsEditor.SelectItem(AObject: TPersistent); +begin + Designer.SelectOnlyThisComponent(TComponent(AObject)); + Designer.Modified; +end; + +procedure TfrmValidatorsEditor.SetValidator(const Value: TJvValidators); +begin + FValidator := Value; + Activated; +end; + +procedure TfrmValidatorsEditor.UpdateCaption; +begin + Caption := RsJvValidatorItemsEditorEllipsis; +end; + +procedure TfrmValidatorsEditor.FormClose(Sender: TObject; + var AAction: TCloseAction); +begin + AAction := caFree; +end; + +procedure TfrmValidatorsEditor.lbValidatorsClick(Sender: TObject); +begin + if lbValidators.ItemIndex > -1 then + with lbValidators do + SelectItem(TJvBaseValidator(Items.Objects[ItemIndex])); +end; + +procedure TfrmValidatorsEditor.alEditorUpdate(AAction: TBasicAction; + var Handled: Boolean); +begin + acDelete.Enabled := lbValidators.ItemIndex > -1; + acMoveUp.Enabled := lbValidators.ItemIndex > 0; + acMoveDown.Enabled := acDelete.Enabled and + (lbValidators.ItemIndex < lbValidators.Items.Count - 1); +end; + + +procedure TfrmValidatorsEditor.acDeleteExecute(Sender: TObject); +begin + Delete(lbValidators.ItemIndex); +end; + +procedure TfrmValidatorsEditor.acMoveUpExecute(Sender: TObject); +var + I: Integer; +begin + with lbValidators do + begin + I := ItemIndex; + Items.Exchange(I, I - 1); + FValidator.Exchange(I, I - 1); + Designer.Modified; + end; +end; + +procedure TfrmValidatorsEditor.acMoveDownExecute(Sender: TObject); +var + I: Integer; +begin + with lbValidators do + begin + I := ItemIndex; + Items.Exchange(I, I + 1); + FValidator.Exchange(I, I + 1); + Designer.Modified; + end; +end; + +procedure TfrmValidatorsEditor.DoAddNewValidator(Sender: TObject); +begin + with Sender as TAction do + AddNew(TJvBaseValidatorClass(Tag)); +end; + +type + TJvBaseValidatorAccess = class(TJvBaseValidator); + +procedure TfrmValidatorsEditor.AddValidatorClasses; +var + I, J, K: Integer; + A: TAction; + M: TMenuItem; + AName: string; + AClass: TJvBaseValidatorClass = nil; +begin + J := TJvBaseValidatorAccess.BaseValidatorsCount; + K := 0; + for I := 0 to J - 1 do + begin + TJvBaseValidatorAccess.GetBaseValidatorInfo(I, AName, AClass); + if AName = '' then + begin + Inc(K); + Continue; + end; + A := TAction.Create(Self); + A.Caption := AName; + A.Tag := NativeInt(AClass); + A.ImageIndex := 0; + if I - K < 9 then + A.ShortCut := ShortCut(Ord('0') + I + 1 - K, [ssCtrl]); + A.OnExecute := @DoAddNewValidator; + M := TMenuItem.Create(popNew); + M.Action := A; + if I = 0 then + begin + M.Default := True; + btnNew.Action := A; + end; + popNew.Items.Add(M); + M := TMenuItem.Create(popForm); + M.Action := A; + if I = 0 then + M.Default := True; + popForm.Items.Insert(I,M); + end; + if J < 2 then + btnNew.Style := tbsButton + else + btnNew.Style := tbsDropDown; + ToolBar1.Width := 0; +end; + +constructor TfrmValidatorsEditor.Create(TheOwner: TComponent); +begin + inherited Create(TheOwner); + if Assigned(GlobalDesignHook) then + begin + GlobalDesignHook.AddHandlerComponentRenamed(@OnComponentRenamed); + GlobalDesignHook.AddHandlerPersistentDeleting(@ItemDeleted); + GlobalDesignHook.AddHandlerGetSelection(@OnGetSelection); + GlobalDesignHook.AddHandlerSetSelection(@OnSetSelection); + end; +end; + +destructor TfrmValidatorsEditor.Destroy; +begin + if Assigned(GlobalDesignHook) then + begin + GlobalDesignHook.AddHandlerComponentRenamed(@OnComponentRenamed); + GlobalDesignHook.RemoveHandlerPersistentDeleting(@ItemDeleted); + GlobalDesignHook.RemoveHandlerGetSelection(@OnGetSelection); + GlobalDesignHook.RemoveHandlerSetSelection(@OnSetSelection); + end; + inherited Destroy; +end; + +//=== { TJvPropertyValidateProperty } ======================================== + +function TJvPropertyValidateProperty.GetAttributes: TPropertyAttributes; +begin + Result := [paValueList, paSortList]; +end; + +procedure TJvPropertyValidateProperty.GetValues(Proc: TGetStrProc); +var + PropList: PPropList; + PropInfo: PPropInfo; + I, J: Integer; + C: TControl; + V:TJvBaseValidator; +begin + if not (GetComponent(0) is TJvBaseValidator) then + Exit; + V := TJvBaseValidator(GetComponent(0)); + C := V.ControlToValidate; + if C = nil then + Exit; + J := GetPropList(PTypeInfo(C.ClassInfo), ValidKinds, nil); + if J > 0 then + begin + GetMem(PropList, J * SizeOf(Pointer)); + J := GetPropList(PTypeInfo(C.ClassInfo), ValidKinds, PropList); + if J > 0 then + try + if V.GetDataLink(C) <> nil then + Proc(cValidatorsDBValue); + for I := 0 to J - 1 do + begin + PropInfo := PropList^[I]; + if (PropInfo <> nil) and (PropInfo^.PropType^.Kind in ValidKinds) then + Proc(PropInfo^.Name); + end; + finally + FreeMem(PropList); + end; + end; +end; + +//=== { TJvPropertyToCompareProperty } ======================================= + +function TJvPropertyToCompareProperty.GetAttributes: TPropertyAttributes; +begin + Result := [paValueList, paSortList]; +end; + +procedure TJvPropertyToCompareProperty.GetValues(Proc: TGetStrProc); +var + PropList: PPropList; + PropInfo: PPropInfo; + I, J: Integer; + C: TControl; + V:TJvControlsCompareValidator; +begin + if not (GetComponent(0) is TJvControlsCompareValidator) then + Exit; + V := TJvControlsCompareValidator(GetComponent(0)); + C := V.CompareToControl; + if C = nil then + Exit; + J := GetPropList(PTypeInfo(C.ClassInfo), ValidKinds, nil); + if J > 0 then + begin + GetMem(PropList, J * SizeOf(Pointer)); + J := GetPropList(PTypeInfo(C.ClassInfo), ValidKinds, PropList); + if J > 0 then + try + + if V.GetDataLink(C) <> nil then + Proc(cValidatorsDBValue); + + for I := 0 to J - 1 do + begin + PropInfo := PropList^[I]; + if (PropInfo <> nil) and (PropInfo^.PropType^.Kind in ValidKinds) then + Proc(PropInfo^.Name); + end; + finally + FreeMem(PropList); + end; + end; +end; + +end.