Post Reply 
[IDEA] TOOLBAR CMD
03-31-2017, 02:12 PM (This post was last modified: 04-03-2017 10:46 AM by compsystems.)
Post: #1
[IDEA] TOOLBAR CMD
Hello, the HP-Prime dialog boxes (a tutorial with all possible combinations of the INPUT command) are superior to the TI68K calcs/1995
http://www.hpmuseum.org/forum/thread-783...ight=INPUT

Only need to complete it with TOOLBAR CMD, an example of code in TI-BASIC, (each function of each ITEM is called by means of a LABEL: ) is required in addition to enclosing the TOOLBAR inside a block LOOP, and each label at the end must return to the LOOP ( With the CYCLE command), there must be at least one label that lets exit (EXIT).

© == commentary
TI68K CODE
PHP Code:
GUIPOLYH()
Prgm
    © animTbar
(): Animations Toolbar
    Local chspolvl

    Loop
       Toolbar
        Title 
"Polyhedron"
          
Item "Regular Polyhedron",regpollb
        © regular
convex polyhedron with congruent faces of regular polygons
          Item 
"Other important polyhedra",othrpolb
        Title 
"Paramts"
          
Item "Set parameters page1/2",wparamlb
          Item 
"Parameters page2/2",wparm2lb
          Item 
"Default values",dftparlb
          Item 
"Print parameters",prtparlb
        Title 
"MakeImag",makeimlb
        Title 
"Animation",startalb
        Title 
"Delete Images"
          
Item "All",delalllb
          Item 
"Current",delcrrlb
        Title 
"Quit"
          
Item "Exit without del. images",quit2lb
          Item 
"Delete All Images",quit1lb
          Item 
"Stop",haltlb
        Title 
"About",aboutlb
      EndTBar
      Cycle © 
goto Loop

     ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl regpollb
:
      If 
polytype≤2 Then 
        polytype→chspolvl
      
EndIf
      
PopUp {"Tetrahedron. 4 Faces","Hexahedron (Cube). 6 Faces","Octahedron. 8 Faces","Dodecahedron 12 Faces","Icosahedron. 20 Faces"},chspolvl
      
If chspolvl=1 Then 
        0→chspolvl
        Dialog
          Text 
"Tetrahedron is one kind of pyramid"
          
Text "composed of 4 triangular faces."
        
EndDlog
        poltype
(1)
      ElseIf 
chspolvl=2 Then 
        0→chspolvl
        Dialog
          Text 
"A cube is a hexahedron with all"
          
Text "its faces square and three squares"
          
Text "around each vertex."
        
EndDlog
        poltype
(2)
      ElseIf 
chspolvl=3 Then 
        0→chspolvl
        poltype
(3)
      ElseIf 
chspolvl≥4 and chspolvl≤5 Then 
        0→chspolvl
        Dialog
          Text 
"Algorithms still not created,"
          
Text "will be included in future releases."
        
EndDlog
      
EndIf
      
Cycle © goto Loop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl othrpolb
      
If polytype≥6 Then 
        polytype
-5→chspolvl
      
EndIf
      
PopUp {"Square Pyramid. 5 Faces","Triangular Prism. 6 Faces"},chspolvl
      
If chspolvl=1 Then 
        0→chspolvl
        Dialog
          Text 
"Square Pyramid is a pyramid, "
          
Text "having a square base"
        
EndDlog
        poltype
(6)
      Else
        If 
chspolvl=2 Then 
          0→chspolvl
          poltype
(7)
        EndIf
      EndIf
      
Cycle © goto Loop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl wparamlb
:wparamts()
      
Cycle © goto Loop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl wparm2lb
:wparamt2()
      
wparm2lb
      Cycle © 
goto Loop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl wparm3lb
:wparamt3()
      
wparm3lb
      Cycle © 
goto Loop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl prtparlb
kernel2\printtxt(prtparm(),0,1,1,1)
      
Cycle

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl dftparlb
:dftvalue()
      
Cycle

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl makeimlb
:makepict(nimages,highpoly,dcrhigvl,hidedgvl,rotatnvl,axesflag,vertexfl,polytype)
      
Cycle © goto Loop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl startalb
:exeanimt(nimages,anidelay,maxcycle,rotatnvl)
      
Cycle © goto Loop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl delalllb
:delpics(nimages,1)
      
Cycle © goto Loop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl delcrrlb
:delpics(nimages,2)
      
Cycle © goto Loop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl aboutlb
:aniintro()
      
Cycle © goto Loop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl quit1lb
:exitprgm(nimages,1)
      Exit 
© to EndLoop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl quit2lb
:exitprgm(nimages,0)
      Exit 
© to EndLoop

      ©©©©©©©©©©©©©©©©©©©©©©©©©
      Lbl haltlb
:Stop
      
Exit © to EndLoop

    EndLoop
EndPrgm 

[Image: toolBar_hp_prime_image00a.png]
[Image: toolBar_hp_prime_image00.png]

I think that in the HP-Prime format (list of lists) would be much easier to code
PHP Code:
toolbar(

"Menu1 name"/icon"Title Name M1"  {{ "Tag1M1 name" function1T1/{function1T1,function2T1,...} }, { "Tag2M1 name " function1T2/{function1T2,function2T2,...} }, ... }  },
"Menu2 name"/icon"Title Name M2"  {{ "Tag1M2 name" function1T1/{function1T1,function2T1,...} }, { "Tag2M2 name " function1T2/{function1T2,function2T2,...} }, ... }  },
...
"Menu1 name"/icon"Title Name M6"  {{ "Tag1M6 name" function1T1/{function1T1,function2T1,...} }, { "Tag2M6 name " function1T2/{function1T2,function2T2,...} }, ... }  },
}


1: Is important for you a TOOLBAR CMD built-in the firmware?

2: What better syntax do you propose? List lists or TI68k style


.
Find all posts by this user
Quote this message in a reply
04-01-2017, 03:15 PM (This post was last modified: 04-03-2017 10:42 AM by compsystems.)
Post: #2
RE: TOOLBAR CMD
Simulating a toolbar with hp-pprgm

[Image: toolBar_hp_prime_image01.png]


PHP Code:
toolbar(

...
"User""Program Functions"  {...{ "Tag2" {function1Tag2function2Tag2function3Tag2function4Tag2 }}, ...  },
...
}

Find all posts by this user
Quote this message in a reply
04-01-2017, 08:37 PM
Post: #3
RE: YAR (Yet Another Request) TOOLBAR CMD
It is a good idea, I do not know if this bar could also be used with CAS programs, it is because lately it has seen that CAS programs presents the differences with non CAS, and in the way of calling them in the form that a CAS program returns a result But it is a good idea to have a menu as well!
Find all posts by this user
Quote this message in a reply
04-01-2017, 08:52 PM
Post: #4
YAR (Yet another Request
Hello, I was working with the Geometry application but I have noticed that although it is quite complete It has no commands or functions to work with conic figures: the ellipse, hyperbola, and parabola. There are no commands to find out the area of an ellipse, or the eccentricity value, or the focus of a parabola drawn on the geometry screen; And I think this is quite necessary because the conics are studied in Calculus and are very important figures in mathematics; Hopefully add commands of this type in future updates other than 3D graphics.
Find all posts by this user
Quote this message in a reply
01-17-2018, 03:44 AM
Post: #5
RE: [IDEA] TOOLBAR CMD
There is some possibility of adding a conical application on the Prime?
Find all posts by this user
Quote this message in a reply
01-17-2018, 04:21 AM
Post: #6
RE: [IDEA] TOOLBAR CMD
ellipse()
hyperbola()
conic()

???

area(<ellipse_object>)

all work as expected...

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
01-17-2018, 09:47 PM
Post: #7
RE: [IDEA] TOOLBAR CMD
not only is the area function, an application is needed in which the focus could be calculated, the directrix of a parabola, the eccentricity of an ellipse, the asymptotes of a determined hyperbola, etc. There is only the area function but not the different components of a conic, hyperbola, ellipse, circle, parabola, etc.
Find all posts by this user
Quote this message in a reply
02-03-2018, 02:06 PM (This post was last modified: 02-04-2018 03:51 PM by compsystems.)
Post: #8
RE: [IDEA] TOOLBAR CMD
A video tutorial, referring to the subject.


Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)