home *** CD-ROM | disk | FTP | other *** search
- // -----
- // VDL161.txt
- // Copyright 1996 Claris
- // -----
- // Link palette
- /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
- /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
- /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
- //This section contains all localizable string constants for this VDL program. Be sure to
- //include the backslash character at the end of each line of a multi-line string, except for the last line.
- //You may also flatten multiline constants into a single line, if you prefer
- #define kLit1 "Local link:"
- #define kLit2 "file.html"
- #define kLit3 "External link:"
- #define kLit4 "http://server/dir/file.html"
- #define kLit5 "Link to anchor:"
- #define kLit6 "http://.../file.html#anchorName"
- #define kLit7 "Anchor in same file:"
- #define kLit8 "#anchorName"
- #define kLit9 "FTP link:"
- #define kLit10 "ftp://server/dir/file.txt"
- #define kLit11 "Mail link:"
- #define kLit12 "mailto:userName@host"
- #define kLit13 "Target Frame specifies the name of a Frame or window in"\
- " which this link's URL will be displayed. Some special"\
- " values can be used:"
-
- #define kLit14 "_blank"
- #define kLit15 "Display in a new window."
- #define kLit16 "_self"
- #define kLit17 "Display in the same window as the link."
- #define kLit18 "_parent"
- #define kLit19 "Display in the next enclosing frame."
- #define kLit20 "_top"
- #define kLit21 "Display in the outermost frame."
- #define kLit22 "&URL:"
- #define kLit23 "&Browse Files..."
- #define kLit24 "&Remove Link"
- #define kLit25 "Show &Examples"
- #define kLit26 "Hide &Examples"
- #define kLit27 "&Target Frame:"
- #define kLit28 "Extra &HTML:"
- //Localized Fonts
- #if Platform_Mac
- #define StaticFont Font = {Geneva, 10, {Bold}}
- #define EditFont Font = {Geneva, 10, {Plain}}
- #define PopupFont Font = {Geneva, 10, {Plain}}
- #define StdLabelFont LabelFont = {Geneva, 10, {Bold}}
- #define URLSampleFont Font = {Geneva, 10, {Plain}}
- #define ButtonFont Font = {Geneva, 10, {Plain}}
- #else
- #define StaticFont Font = SystemFont
- #define EditFont Font = SystemFont
- #define PopupFont Font = SystemFont
- #define StdLabelFont LabelFont = SystemFont
- #define URLSampleFont Font = SystemFont
- #define ButtonFont Font = SystemFont
- #endif
- /************************** LOCALIZED STRING CONSTANTS END **************************************/
- /************************** LOCALIZED STRING CONSTANTS END **************************************/
- /************************** LOCALIZED STRING CONSTANTS END **************************************/
- /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
- /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
- /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
- //This section contains integer constants that are used to format this VDL program.
- //These are localizable - they only need to be changed if the localized strings
- //are sufficiently longer than the US strings. Localize the strings first, then the constants.
- //Width of the first column of text in the upper half of the window
- #define kFirstColUpperWidth 110
- //Width of the first column of text in the lower half of the window
- #define kFirstColLowerWidth 70
- //Text to the left of the URL examples first column, and the target frame text.
- #define kSampleTextLeftMargin 30
- #if Platform_Mac
- //Constant used to derive the width of the palette
- #define kBasicLinkPaletteWidth 340
-
- //Width of the "Target Frame:" and "Extra HTML" labels in the lower half of the window
- #define kLabelWidth 86
- #define kBrowseButtonWidth 105
- #define kRemoveLinkButtonWidth 105
- #define kHideShowExButtonWidth 105
- #else // !Platform_Mac
- //Constant used to derive the width of the palette
- #define kBasicLinkPaletteWidth 545
-
- //Pixels to subtract from the palette width to make the string kLit13 wordwrap correctly.
- #define kTargetTextAdjustment 85
-
- //Width of the "Target Frame:" and "Extra HTML" labels in the lower half of the window
- #define kLabelWidth 106
- #endif // else !Platform_Mac
- /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
- /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
- /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
- //No further localizable data past this point
- /************************** END LOCALIZABLE DATA ***************************************************/
- /************************** END LOCALIZABLE DATA ***************************************************/
- /************************** END LOCALIZABLE DATA ***************************************************/
-
-
- #ifdef TryMe
- #define LITE_VERSION 1
- #endif
-
- #define EH EnabledHelpString =
- #if Platform_Mac
- #define LinkBack BackColor = {57015, 57015, 57015}
- #else
- #define LinkBack BackColor = Dialog
- #endif
- Define(URLExamples)
- VList(LinkBack)
- {
- HList()
- {
- StaticText( kLit1, Width = kFirstColUpperWidth, URLSampleFont);
- StaticText( kLit2, URLSampleFont);
- }
-
- HList()
- {
- StaticText( kLit3, Width = kFirstColUpperWidth, URLSampleFont);
- StaticText( kLit4, URLSampleFont);
- }
-
- HList()
- {
- StaticText( kLit5, Width = kFirstColUpperWidth, URLSampleFont);
- StaticText( kLit6, URLSampleFont);
- }
-
- HList()
- {
- StaticText( kLit7, Width = kFirstColUpperWidth, URLSampleFont);
- StaticText( kLit8, URLSampleFont);
- }
-
- HList()
- {
- StaticText( kLit9, Width = kFirstColUpperWidth, URLSampleFont);
- StaticText( kLit10, URLSampleFont);
- }
-
- HList()
- {
- StaticText( kLit11, Width = kFirstColUpperWidth, URLSampleFont);
- StaticText( kLit12, URLSampleFont);
- }
-
- } // URLExamples
- Define(TargetExamples)
- VList(LinkBack)
- {
- #if Platform_Mac
- StaticText( kLit13,
- Width = kBasicLinkPaletteWidth, URLSampleFont );
- #else
- StaticText( kLit13,
- Width = kBasicLinkPaletteWidth - kTargetTextAdjustment, URLSampleFont );
- #endif
- Spacer(Width=0,Height=4);
-
- HList()
- {
- Spacer(Width=kSampleTextLeftMargin,Height=0);
- StaticText( kLit14, Width = kFirstColLowerWidth, URLSampleFont);
- StaticText( kLit15, URLSampleFont);
- }
-
- HList()
- {
- Spacer(Width=kSampleTextLeftMargin,Height=0);
- StaticText( kLit16, Width = kFirstColLowerWidth, URLSampleFont);
- StaticText( kLit17, URLSampleFont);
- }
-
- HList()
- {
- Spacer(Width=kSampleTextLeftMargin,Height=0);
- StaticText( kLit18, Width = kFirstColLowerWidth, URLSampleFont);
- StaticText( kLit19, URLSampleFont);
- }
-
- HList()
- {
- Spacer(Width=kSampleTextLeftMargin,Height=0);
- StaticText( kLit20, Width = kFirstColLowerWidth, URLSampleFont);
- StaticText( kLit21, URLSampleFont);
- }
-
- } // TargetExamples
-
- Define(MoreLinkChoices)
- VList(Width = UseParent, LinkBack)
- {
- EditText( target, FilterProc = "SetLinkTarget",
- Label = kLit27, LabelAlignment = Right, LabelWidth = kLabelWidth,
- Width = UseParent, DropOnReturn, DropOnEnter, NoSmartQuotes,
- EditFont, StdLabelFont,
- NoSmartEdits, BackColor = {65535, 65535, 65535} );
- Spacer(Height = 5);
-
- EditText( extraParams, FilterProc = "SetLinkExtras",
- Label = kLit28, LabelAlignment = Right, LabelWidth = kLabelWidth,
- Width = UseParent, DropOnReturn, DropOnEnter, NoSmartQuotes,
- EditFont, StdLabelFont,
- NoSmartEdits, BackColor = {65535, 65535, 65535} );
-
- Switch(showURLExamples)
- {
- case 0:
- Spacer(Width = 0, Height = 0);
-
- case 1:
- Margin(5,5,0,0, Width = UseParent)
- Call(TargetExamples);
- }
-
- } // MoreLinkChoices
-
- Define(BasicURLUpper)
- VList(LinkBack, Width = kBasicLinkPaletteWidth)
- {
- Switch(canURL, LinkBack)
- {
- case 0:
- HList(Width = UseParent)
- {
- Spacer(Width = 5, Height = 0);
- Margin(0,0,0,0)
- #if Platform_Mac
- VList(Width = UseParent, Height = 16)
- GenericView("DisabledURL");
- #else
- VList(Width = UseParent, Height = 19)
- GenericView("DisabledURL");
- #endif
- Spacer(Width = 5, Height = 0);
- GenericView("LinkShortcut");
- }
-
- case 1:
- HList(Width = UseParent)
- {
- Spacer(Width = 5, Height = 0);
- Margin(0,0,0,0)
- Tag(LinkURL)
- EditText( url, FilterProc = "SetLinkURL",
- Label = kLit22, LabelAlignment = Right,
- Width = UseParent, DropOnReturn, DropOnEnter, NoSmartQuotes,
- NoSmartEdits, EditFont, StdLabelFont,
- BackColor = {65535, 65535, 65535} );
- Spacer(Width = 5, Height = 0);
- GenericView("LinkShortcut");
- }
-
- } // Switch(canURL) (BasicURLUpper)
-
- Spacer(Height = 5);
-
- HList()
- {
- Spacer(Width = 5, Height = 0);
- PushButton( kLit23, 3015, "None", ButtonFont,
-
- #if Platform_Mac
- Width = kBrowseButtonWidth,
- #endif
-
- BackColor = {57015, 57015, 57015} ); // ccEditFileLink
- Spacer(Width=10, Height=0);
-
- PushButton( kLit24, 3010, "None", ButtonFont ,
-
- #if Platform_Mac
- Width = kRemoveLinkButtonWidth,
- #endif
-
- BackColor = {57015, 57015, 57015} ); // ccRemoveLink
- Spacer(Width=10, Height=0);
-
- Switch(showURLExamples)
- {
- case 0:
- #if Platform_Mac
- PushButton( kLit25, 3110, "None", Width = kHideShowExButtonWidth, ButtonFont,
- BackColor = {57015, 57015, 57015} ); // ccShowHideURLTipsPalette
- #else
- PushButton( kLit25, 3110, "None", ButtonFont,
- BackColor = {57015, 57015, 57015} ); // ccShowHideURLTipsPalette
- #endif
-
- case 1:
- #if Platform_Mac
- PushButton( kLit26, 3110, "None" , Width = kHideShowExButtonWidth, ButtonFont,
- BackColor = {57015, 57015, 57015} ); // ccShowHideURLTipsPalette
- #else
- PushButton( kLit26, 3110, "None", ButtonFont,
- BackColor = {57015, 57015, 57015} ); // ccShowHideURLTipsPalette
- #endif
- }
- }
- }
-
- Margin(5,6,6,6,LinkBack)
- VList(Width = kBasicLinkPaletteWidth )
- {
- Call(BasicURLUpper);
-
- Switch(showURLExamples)
- {
- case 0:
- Spacer(Width = 0, Height = 0);
-
- case 1:
- Margin(kSampleTextLeftMargin + 5,5,0,0)
- Call(URLExamples);
-
- }
-
- Spacer(Height = 3);
-
-
- Switch(canURLExtras, Width = UseParent)
- {
- case 0:
- default:
- VList(Width = UseParent)
- {
- Spacer(Height = 6);
- Spacer(Height = 1, Width = UseParent);
- Spacer(Height = 5, Width = 0);
- }
-
- #if !LITE_VERSION
- case 1:
- VList(Width = UseParent)
- {
- HList(Width = UseParent)
- {
- // CheckBox(moreLinkChoices, "", Width = 16);
- PictCheckBox(moreLinkChoices)
- {
- On(Draw, 'cicn', 1204);
- Off(Draw, 'cicn',1203);
- DisabledOn(Draw, 'cicn', 1204);
- DisabledOff(Draw, 'cicn', 1203);
- TrackingOn(Draw, 'cicn', 1206);
- TrackingOff(Draw, 'cicn', 1205);
- };
-
- VList(Width = UseParent)
- {
- Spacer(Height = 5);
- Spacer(Height = 1, Width = UseParent, BackColor = {25000, 25000, 25000});
- Spacer(Height = 6, Width = 0);
- }
- }
-
- Switch(moreLinkChoices , Width = UseParent)
- {
- case 0:
- Spacer(Width = 0, Height = 0);
-
- case 1:
- Call(MoreLinkChoices);
-
- } // Switch(moreLinkChoices)
- } // VList
- #endif
- } // Switch(canURLExtras)
-
- #ifdef TryMe
- Spacer(Height = 5, Width = UseParent, BackColor = White);
- VList(BackColor = White, Width = UseParent)
- {
- StaticText("Debugging Utils:");
- CheckBox("CanURLExtras", canURLExtras);
- CheckBox("moreLinkChoices", moreLinkChoices);
- CheckBox("showURLExamples", showURLExamples);
- CheckBox("CanURL", canURLs);
- }
- #endif
-
- } // VList()
-