Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
HelpCallBacks.writeAttrib - handle an attribute change while displaying a help page
Calling Sequence
void writeAttrib( Object data, int attrib ) throws MapleException
Parameters
data
-
arbitrary data that was passed into the getHelp call
attrib
new attribute
Description
writeAttrib is a member function of the com.maplesoft.openmaple.HelpCallBacks interface. It is called when special formatting is expected for the following characters. The given attribute should be used until the next call to writeAttrib.
The following exports of HelpCallBacks are the possible values for attrib.
MAPLE\_ATTRIB\_NORMAL is used to indicate that the following characters should be displayed normally.
MAPLE\_ATTRIB\_BOLD is used to indicate that the following characters should be displayed boldfaced.
MAPLE\_ATTRIB\_ITAL is used to indicate that the following characters should be displayed in italics.
MAPLE\_ATTRIB\_UNDER is used to indicate that the following characters should be displayed underlined.
If writeAttrib returns true the rendering of the help page is terminated.
Examples
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
static private class CallBacks implements HelpCallBacks
int currentAttrib;
StringBuffer sBuf;
int lineNum;
CallBacks()
currentAttrib = MAPLE_ATTRIB_NORMAL;
sBuf = new StringBuffer( 100 );
lineNum = 1;
}
public boolean writeChar( Object data, int c )
if ( c == 'n' )
System.out.print( lineNum + " " );
System.out.println( sBuf.toString() );
sBuf.delete( 0, sBuf.length() );
lineNum++;
else
sBuf.append( (char)c );
return false;
public boolean writeAttrib( Object data, int attrib )
if ( currentAttrib != attrib )
switch ( currentAttrib )
case MAPLE_ATTRIB_BOLD:
sBuf.append( "</B>" );
break;
case MAPLE_ATTRIB_ITAL:
sBuf.append( "</I>" );
case MAPLE_ATTRIB_UNDER:
sBuf.append( "</U>" );
currentAttrib = attrib;
sBuf.append( "<B>" );
sBuf.append( "<I>" );
sBuf.append( "<U>" );
public static void main( String notused[] ) throws MapleException
String mapleArgs[];
Engine engine;
mapleArgs = new String[1];
mapleArgs[0] = "java";
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
null, null );
engine.getHelp( "colon",
engine.MAPLE_HELP_ALL, new CallBacks(), 70, null );
Executing this code produces the following output.
1 <B>Statement Separators</B>
2
3 <B>Description</B>
4 - The statement separators in Maple are semicolon (;) and colon (:).
5
6 - The semicolon is the normal statement separator.
7
8 - In an interactive Maple session, the result of the statement will
9 not be displayed if the statement is terminated with a colon.
10
11 - The two statement separators (semicolon and colon) are equivalent in
12 the case of statements nested one or more levels (inside if
13 -statements, do-statements, or procedures).
14
15 Important: When exporting a worksheet as Maple Input, your worksheet
16 must contain explicit semicolons and not auto-inserted ones. The
17 resulting exported .mpl file will not run in Command-line Maple with
18 auto-inserted semicolons.
19
20
21 <B>Examples</B>
22 > one := 0+1:
23 > two := one+1;
24
25 <I>two</I> := 2
26
27
28 <B>See Also </B>
29 <U>worksheet,managing,exportMapleInput</U>, <U>statement</U>
30
See Also
OpenMaple, OpenMaple/Java/Engine, OpenMaple/Java/Engine/getHelp, OpenMaple/Java/HelpCallBacks, OpenMaple/Java/HelpCallBacksDefault, OpenMaple/Java/HelpCallBacksDefault/writeAttrib
Download Help Document