From 2f7d4f902639750d8c0ca49bb15ed11a3d5cadd9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 12 Aug 2008 02:22:02 +0000 Subject: Move CBitmap interface closer to motif port for easier porting. git-svn-id: http://svn.drobilla.net/lad/mda-lv2@1342 a436a847-0d15-0410-975c-d299462d15a1 --- src/mdaSpecMeterGUI.cpp | 13 ++++++------- src/mdaSpecMeterGUI.h | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mdaSpecMeterGUI.cpp b/src/mdaSpecMeterGUI.cpp index d36622d..81ca615 100644 --- a/src/mdaSpecMeterGUI.cpp +++ b/src/mdaSpecMeterGUI.cpp @@ -9,10 +9,15 @@ #include +CResTable pngResources = { { 128, "mdaSpecMeter.png" } }; + mdaSpecMeterGUI::mdaSpecMeterGUI(AudioEffect * effect) : AEffGUIEditor(effect) , background(NULL) { + background = new CBitmap(128); + rect.right = (LvzInt16) background->getWidth(); + rect.bottom = (LvzInt16) background->getHeight(); } @@ -22,15 +27,9 @@ mdaSpecMeterGUI::~mdaSpecMeterGUI() } -bool +long mdaSpecMeterGUI::open(void *ptr) { - if (background == NULL) { - background = new CBitmap(*this, "mdaSpecMeter.png"); - rect.right = (LvzInt16) background->getWidth(); - rect.bottom = (LvzInt16) background->getHeight(); - } - AEffGUIEditor::open(ptr); CPoint offs(0, 0); diff --git a/src/mdaSpecMeterGUI.h b/src/mdaSpecMeterGUI.h index 263a20b..99a71f7 100644 --- a/src/mdaSpecMeterGUI.h +++ b/src/mdaSpecMeterGUI.h @@ -28,7 +28,7 @@ public: mdaSpecMeterGUI(AudioEffect* effect); ~mdaSpecMeterGUI(); - bool open(void* ptr); + long open(void* ptr); void idle(); void close(); -- cgit v1.2.1