[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] Re: Manual - Modes - Functions section



In message <5723cbd623Lists@xxxxxxxxxxx>
          "Richard Torrens (lists)" <Lists@xxxxxxxxxxx> wrote:

> I may be starting to sort some of the confusion over the Functions section
> of the Modefile. Please correct my errors.
> 
> The word "Functions" in not related to the programs functions. It is
> really "Operations of Mouse clicks on Toolbar and mode-menu"

The exact reason why it's called "Functions" is lost in time. The name
is 'correct' as it ties a list of internal functions to a toolbar icon
or a menu item. Of course, other sections, such as ClickList & KeyList
tie internal functions to certain actions too.

> The section in the Basemode.ModeFile is laid out in blocks - but I suspect
> the blocks are not necessarily meaningful? If so, the blank lines make
> things confusing! Not a problem unless you are trying to explain things!

The blank lines are necessary to avoid ambiguity*. The lines in a block
can be in any order so we could have:

   Icon    SpriteName
   Help    HelpToken
   Select  SomeFunction
   Key     KeyName
   Adjust  AnotherFunction

It's unclear if the Key definition belongs to Select or Adjust. To avoid
this each Select/Adjust line must be separated from other Select/Adjust
lines using a blank line. If the Key line belongs to Select we need:

   Icon    SpriteName
   Help    HelpToken
   Select  SomeFunction
   Key     KeyName

   Adjust  AnotherFunction

When it belongs to Adjust then this is required:

   Icon    SpriteName
   Help    HelpToken
   Select  SomeFunction

   Key     KeyName
   Adjust  AnotherFunction

* That's my interpretation as neither the manual nor the source are very
  clear on this.

> a line starting "Icon" ties that block to the icon whose name follows (on
> the same line) the word Icon.

Correct.

> Similarly I would expect the lines starting "Menu" to start a block
> defining the action when the Mode's Menu is clicked?

A Menu line is used to add an entry to the Mode's submenu of the View
menu. Menu over view -> last item (mode name) -> last section of submenu

> Except that "Menu" in a block starting "Icon" seems to define what happens
> when the Menu button is clicked on that entry?

No, a Menu click on a Toolbar icon will have the same effect as Select.

> Phew...
> 
> Explaining this in the instructions is not going to be easy!

Nope. Worse, it would seem that the SH manual is not entirely accurate
as it seems to suggest that multiple actions can be tied to a Menu
block. However items in the Mode's submenu always carry out the Select
action when clicked upon regardless of mouse button / modifiers keys.

Cheers,
Fred.

-- 
StrongED Developer
http://www.stronged.iconbar.com/

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at
http://stronged.torrens.org/index.html