1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 14:25:11 +03:00

Cosmetics

This commit is contained in:
Bertrand Songis 2019-06-18 12:41:29 +02:00
parent afa69cb0c5
commit 65860da986
No known key found for this signature in database
GPG key ID: F189F79290FEC50F

View file

@ -78,10 +78,10 @@ FXDEFMAP(OpenTxSim) OpenTxSimMap[] = {
FXIMPLEMENT(OpenTxSim, FXMainWindow, OpenTxSimMap, ARRAYNUMBER(OpenTxSimMap))
OpenTxSim::OpenTxSim(FXApp* a):
FXMainWindow(a, "OpenTX Simu", NULL, NULL, DECOR_ALL, 20, 90, 0, 0)
FXMainWindow(a, "OpenTX Simu", nullptr, nullptr, DECOR_ALL, 20, 90, 0, 0)
{
memset(displayBuf, 0, DISPLAY_BUFFER_SIZE * sizeof(display_t));
bmp = new FXPPMImage(getApp(),NULL,IMAGE_OWNED|IMAGE_KEEP|IMAGE_SHMI|IMAGE_SHMP, W2, H2);
bmp = new FXPPMImage(getApp(), nullptr, IMAGE_OWNED|IMAGE_KEEP|IMAGE_SHMI|IMAGE_SHMP, W2, H2);
#if defined(SIMU_AUDIO)
SDL_Init(SDL_INIT_AUDIO);
@ -95,16 +95,16 @@ OpenTxSim::OpenTxSim(FXApp* a):
switch (i) {
#define L LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT|LAYOUT_FIX_X|LAYOUT_FIX_Y
case 0:
sliders[i]=new FXSlider(hf1,NULL,0,L|SLIDER_HORIZONTAL,10,110,100,20);
sliders[i]=new FXSlider(hf1, nullptr, 0, L|SLIDER_HORIZONTAL, 10, 110, 100, 20);
break;
case 1:
sliders[i]=new FXSlider(hf1,NULL,0,L|SLIDER_VERTICAL,110,10,20,100);
sliders[i]=new FXSlider(hf1, nullptr, 0, L|SLIDER_VERTICAL, 110, 10, 20, 100);
break;
case 2:
sliders[i]=new FXSlider(hf1,NULL,0,L|SLIDER_VERTICAL,130,10,20,100);
sliders[i]=new FXSlider(hf1, nullptr, 0, L|SLIDER_VERTICAL, 130, 10, 20, 100);
break;
case 3:
sliders[i]=new FXSlider(hf1,NULL,0,L|SLIDER_HORIZONTAL,150,110,100,20);
sliders[i]=new FXSlider(hf1, nullptr, 0, L|SLIDER_HORIZONTAL, 150, 110, 100, 20);
break;
default:;
}
@ -114,7 +114,7 @@ OpenTxSim::OpenTxSim(FXApp* a):
}
for(int i=0; i<NUM_POTS+NUM_SLIDERS; i++){
knobs[i]= new FXKnob(hf11,NULL,0,KNOB_TICKS|LAYOUT_LEFT);
knobs[i]= new FXKnob(hf11, nullptr, 0, KNOB_TICKS|LAYOUT_LEFT);
knobs[i]->setValue(0);
#if defined(PCBHORUS)
@ -165,7 +165,7 @@ OpenTxSim::~OpenTxSim()
void OpenTxSim::createBitmap(int index, uint16_t *data, int x, int y, int w, int h)
{
FXPNGImage snapshot(getApp(), NULL, IMAGE_OWNED, w, h);
FXPNGImage snapshot(getApp(), nullptr, IMAGE_OWNED, w, h);
for (int i=0; i<w; i++) {
for (int j=0; j<h; j++) {
@ -191,7 +191,7 @@ void OpenTxSim::createBitmap(int index, uint16_t *data, int x, int y, int w, int
void OpenTxSim::makeSnapshot(const FXDrawable* drawable)
{
// Construct and create an FXImage object
FXPNGImage snapshot(getApp(), NULL, 0, drawable->getWidth(), drawable->getHeight());
FXPNGImage snapshot(getApp(), nullptr, 0, drawable->getWidth(), drawable->getHeight());
snapshot.create();
// Create a window device context and lock it onto the image
@ -541,7 +541,7 @@ int main(int argc, char ** argv)
// The decorations determine stuff like the borders, close buttons,
// drag handles, and so on the Window Manager is supposed to give this
// window.
//FXMainWindow *main=new FXMainWindow(&application,"Hello",NULL,NULL,DECOR_ALL);
//FXMainWindow *main=new FXMainWindow(&application, "Hello", nullptr, nullptr, DECOR_ALL);
opentxSim = new OpenTxSim(&application);
application.create();