\begindata{text,538010656}
\textdsversion{12}
\template{help}
\define{global
}
\chapter{SButton: managing multiple buttons

}
\section{What SButton is

}\leftindent{
SButton is an inset designed to allow you to place a collection of buttons in 
a document.  Currently it is only really useful in conjunction with 
\helptopic{ADEW} and \helptopic{Ness}.  See the help files on these topics for 
more information.

}
\section{Adding an sbutton to a document

}\leftindent{
To add an sbutton to a document  you can type ESC - tab, and answer the 
question of what type of data object to insert with "sbutton" (without the 
quotes).  A left click in the button that appears will highlight the button 
but won't cause any action.  If you wish the button to do something you will 
need to use Ness and ADEW.

}
\section{Changing an sbutton

}
\leftindent{To change the way the sbutton or a button within it appears, click 
in it with the right button.  If you click within a button in the sbutton then 
the menu options "Set Label", "Set Trigger", "Set Button Group", and "Delete 
Button" will apply to that button (more on these options can be found in the 
sectuions \bold{The Sbutton menu} and \bold{The Default menu} below).  Two 
menu items will appear:  SButton and Default.  The SButton menu lets you 
change the label of a button or change its trigger (for more on triggers see 
the help on Ness),  add or delete buttons, change how the buttons are 
arranged, or create a new "group".  A group is a set of buttons which share 
the same visual appearance (aside from their name).  The group menus let you 
set a button's group, or modify the appearance of buttons in the group (the 
Default menu is one example of a group menu).


\subsection{The SButton menu}

}\leftindent{	

\bold{Set Label}: this option sets the string which appears in the button.

\bold{Set Trigger}: sets the name of the trigger to be "pulled" when the 
button is actuated (by a left click and release).


\bold{Add Button}: adds another button to the sbutton object; the new button 
is placed in the upper-left hand corner of the sbutton.  You will be prompted 
for a name for the new button.

\bold{Delete Button}: removes the button specified by the last right click.


\bold{Set Rows}: sets the number of rows the sbutton will use. The sbutton 
will then grow additional columns if needed to contain all the buttons.

\bold{Set Columns}: sets the number of columns the sbutton will use. The 
sbutton will then grow additional rows if needed to contain all buttons.


\bold{New Group}: this option will create a new group; it will ask you to name 
the group.  This will give you a menu similar to the Default menu; it will 
have two additional items, explained below in the section \bold{The Default 
menu}.


\subsection{The Default menu (and other group menus)}

	

\bold{Set Button Group}: this will set the group of the last button selected 
by a right click to be this group. Once this has been done any changes in this 
group will be reflected in the appearance of the button.  More than one button 
can be in a group.  By default all buttons are in the Default group.

\bold{Set Font}: sets the font which will be used to draw the labels on 
buttons in this group.

\bold{Set Style}: five different "styles" of buttons are provided; they range 
from just a text label to an "OSF/Motif" (TM) style. A dialog box will be 
brought up to display the choices.

\bold{Set Colors}: lets you give the buttons a hint as to what foreground and 
background color is around it, so that it can choose colors which will 
hopefully look reasonable in context.

\bold{Set Shadow Colors}: lets you set the colors used for the upper and lower 
shadows and for the top of the buttons.

\bold{Set Label Colors}: lets you change the color the labels of the buttons 
are drawn in.


(Note: these last two items only appear on the menus for user created groups, 
and not for the Default group.)


\bold{Rename Group}: changes the name of the group. None of the buttons are 
changed.  This can be useful if you accidentally give a group the same name as 
some other menu card (ie Page, File, etc...), since then the menu items will 
get mixed together and be more difficult to find.

\bold{Delete Group}: if a group no longer serves any purpose you can delete 
it.  Any buttons in the group will revert to the Default group.

}
\section{Warnings

}\leftindent{
If you give a group the same name as an existing menu card, the items from 
that menu card and the items for the sbutton will be mixed together on the 
menu card.  It is a good idea to make sure that you give groups unique names 
and that the names don't correspond to any existing menu cards.

If you use both color and monochrome screens you should be careful that you 
arrange for your color preferences to be in effect only when you are using the 
color display.  See the help document "Preferences" for information on 
ensuring that some preferences are used only for certain displays.  Also note 
that if your color scheme is light color on dark, buttons which should appear 
depressed may look raised. You can use the preferences SButtonTopShadow and 
SButtonBottomShadow (given in the quick reference section below) to rectify 
this if it occurs.\leftindent{

}
}
\section{ Preferences

}\leftindent{
\bold{SButtonVBorder: \italic{5}}

\leftindent{Sets the space in pixels between the buttons in the sbutton and 
the border of the sbutton on the top and bottom.


}\bold{SButtonHBorder: \italic{5}}

\leftindent{Sets the space in pixels between the buttons in the sbutton and 
the border of the sbutton on the top and bottom.


}\bold{SButtonVSpacing: \italic{5}}

\leftindent{Sets the vertical space in pixels between the buttons in the 
sbutton.


}\bold{SButtonHSpacing: \italic{5}}

\leftindent{Sets the horizontal space in pixels between the buttons in the 
sbutton.

}\bold{
SButtonAlwaysInherit: \italic{no}

}\leftindent{If set to yes, the settings below will apply to all instances of 
sbutton objects (for example in dialog boxes and scrollbars).  When this is 
no, settings below only apply to sbuttons.

}\bold{
SButtonStyle}:\formatnote{ \bold{\italic{4}}}

\leftindent{This integer preference specifies which "look" should be used for 
all the components of the sbutton.  The default of 4 indicates "OSF/Motif" 
(TM) appearance. 


The possible values for this preference are:

	0. Plain Text}

\leftindent{\leftindent{1. Double Boxed.

2. Three Dimensional.

3. Plain Box.

4. OSF/Motif (TM).

}}
\bold{SButtonForeground}: \bold{<defaults to the foreground color for the 
application, as set by the foregroundcolor preference>}\bold{\bold{ }(see the 
preferences help file for more information)}

\leftindent{This color will be used to compute several other colors to provide 
a "3D" effect for the "Three Dimensional" and "OSF/Motif" (TM) style sbuttons.


}\bold{SButtonBackground}: \bold{<defaults to the background color for the 
application, as set by the backgroundcolor preference>\bold{ }(see the 
preferences help file for more information)}

\leftindent{This color will be used to compute several other colors to provide 
a "3D" effect for the "Three Dimensional" and "OSF/Motif" (TM) style sbuttons. 
 

}
\bold{SButtonTop}:  \bold{<by default this is computed from the foreground and 
background preferences>}

\leftindent{This color will be used to fill the background area around the 
button's label.


}\bold{SButtonTopShadow:} \bold{<by default this is computed from the 
foreground and background preferences>

}\leftindent{The color which will be used to draw the upper shadow of the 
button. (For "OSF/Motif" (TM) and "Three Dimensional" styles only.)


}\bold{SButtonBottomShadow:} \bold{<by default this is computed from the 
foreground and background preferences>

}\leftindent{The color which will be used to draw the bottom shadow of the 
button. (For "OSF/Motif" (TM) and "Three Dimensional" styles only.)


}\bold{SButtonLabelForeground: 
}\italic{\bold{\bold{\italic{ }}}}}\bold{\leftindent{<defaults to the 
foreground color for the application, as set by the foregroundcolor 
preference>}}\leftindent{\italic{\bold{\bold{\italic{\bold{\bold{ }(see the 
preferences help file for more information)}}}}}

\leftindent{The color in which the actual label of a button will be drawn in.


}\bold{SButtonLabelBackground}:  \bold{<defaults to the background color for 
the application, as set by thebackgroundcolor preference>}\italic{\bold{\bold{ 
}}}\bold{\italic{\bold{(see the preferences help file for more information)}}}

\leftindent{The color of the shadow around the label of a button.  (For the 
"3D"ish buttons.)

}
}
\section{Notices

}\leftindent{OSF and Motif are registered trademarks of the Open Software 
Foundation.

}
\section{Program Author}

\leftindent{
}\leftindent{Rob Ryan (rr2b@andrew.cmu.edu)}


\begindata{bp,537558784}
\enddata{bp,537558784}
\view{bpv,537558784,365,0,0}
Copyright 1992 Carnegie Mellon University and IBM.  All rights reserved.

\smaller{\smaller{$Disclaimer: 

Permission to use, copy, modify, and distribute this software and its 

documentation for any purpose is hereby granted without fee, 

provided that the above copyright notice appear in all copies and that 

both that copyright notice, this permission notice, and the following 

disclaimer appear in supporting documentation, and that the names of 

IBM, Carnegie Mellon University, and other copyright holders, not be 

used in advertising or publicity pertaining to distribution of the software 

without specific, written prior permission.



IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 

DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 

ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 

SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 

BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 

DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 

WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 

ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 

OF THIS SOFTWARE.

 $

}}\enddata{text,538010656}
