A method to our madness....... PANEL

fergy

Member ++
Joined
Jan 11, 2007
Messages
170
Reaction score
3
Location
croatia
NOTE THAT THIS EXAMPLE IS NOT FOR BEGINNERS but anyway, this will introduce You how easy is to make new control panel.
For first I will explain how things going and if anyone want to try, I will help.
Please, don't let this scare You. Nobody is perfect and also nobody of us was NOT BORN as Einstein!!!!! : multi :

In order to add into our cvs image an control panel, some parts of enigma We must change.

OK, let's start:
The advanced formulation, We want enter here........ who would not want to enter in the room of the buttons! : colors1
An look to enigma sources

setup_extra.cpp

Code:
You don't have permission to view the code content. Log in or register now.

and setup_extra.h:

Code:
You don't have permission to view the code content. Log in or register now.

It is a window formulations that call selected entry through callback directed from the remote control, from 1 to 9. We see also that the 3 parameters are the title it of the window, the number of the entries and the width of the window. The sintax is a complicated P2o more, the setup window is derived of one class template. The definitions are in the header listbox.h:

Code:
You don't have permission to view the code content. Log in or register now.

Our model have parameters “eString Title= "", int Entrys=0, int width=400, bool sbar=0”, already seen before except the last one, a variable bool that defines the presence (true) or the absence (false) in the generated window, of the status bar.
Here a P2o comes with one more class defined, always in listbox.h,

Code:
You don't have permission to view the code content. Log in or register now.

Here We go:

1 - Include the header of the panel:

Code:
You don't have permission to view the code content. Log in or register now.

2 - Add the new entrymenu…. (we also add an other separator in order “to distinguish it” better :)

Code:
You don't have permission to view the code content. Log in or register now.

3 -….connected to the new method tns_panel (), the function that calls the panel:

Code:
You don't have permission to view the code content. Log in or register now.

4 - We will go to declare the new method tns_panel () of eExpertSetup in the header relative:

Code:
You don't have permission to view the code content. Log in or register now.

tnsspanel.h

Code:
You don't have permission to view the code content. Log in or register now.

tnspanel.cpp

Code:
You don't have permission to view the code content. Log in or register now.

So, just few steps:
cd "mycdk"/cdk
rm .enigma
make .enigma
make rebuild-flash
 
Back
Top