Is Prime via fluid
- fluid IsPrimeGUI.fl
- create new class (IsPrimeGUI)
- add constructor (IsPrimeGUI())
- add window to the constructor (new Group Window) name the window win
- add input textbox (named question)
- add button (named askQuestion) label is "Is prime?"
- add output textbox (named answer)
- now save, write code and take a look at the source code
- Note, there is no main!! You will need an
IsPrimeMain.cxx main that creates an instance
of IsPrimeGUI (and shows the window!!) (not done automagically by
what we have created so far).
- ok, now you need a Makefile, here is my Makefile (examine its contents after class).
- Now you can make IsPrime
- Add in code handled by the IsPrime button press
- Initially, just print out (to the console) the question being asked.
Note the #include required in the extra code section.
Note that you could have specified a callback function instead.
- Modify the above so that you parse the question, determine its
primality and write the answer.