Browse Source

Rename SourcesEditor to SourcesEditorWidget

master
Krisjanis Rijnieks 9 years ago
parent
commit
3644c25f95
  1. 2
      src/Application/States/ProjectionMappingState.cpp
  2. 7
      src/Application/States/SourceSelectionState.cpp
  3. 2
      src/Application/States/TextureMappingState.cpp
  4. 2
      src/Commands/SetNextSourceCmd.cpp
  5. 8
      src/Commands/SetNextSourceCmd.h
  6. 2
      src/Commands/SetSourceCmd.cpp
  7. 8
      src/Commands/SetSourceCmd.h
  8. 4
      src/Commands/TogglePerspectiveCmd.h
  9. 2
      src/Surfaces/SurfaceManagerGui.cpp
  10. 6
      src/Surfaces/SurfaceManagerGui.h
  11. 134
      src/UserInterface/SourcesEditorWidget.cpp
  12. 4
      src/UserInterface/SourcesEditorWidget.h

2
src/Application/States/ProjectionMappingState.cpp

@ -216,7 +216,7 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar
app->getCmdManager()->exec( app->getCmdManager()->exec(
new SetNextSourceCmd( new SetNextSourceCmd(
app->getSurfaceManager()->getSelectedSurface(), app->getSurfaceManager()->getSelectedSurface(),
app->getGui()->getSourcesEditor())); app->getGui()->getSourcesEditorWidget()));
}else{ }else{
app->getCmdManager()->exec(new SelNextSurfaceCmd(app->getSurfaceManager())); app->getCmdManager()->exec(new SelNextSurfaceCmd(app->getSurfaceManager()));
} }

7
src/Application/States/SourceSelectionState.cpp

@ -13,7 +13,8 @@ SourceSelectionState * SourceSelectionState::instance(){
} }
void SourceSelectionState::setup(Application * app){ void SourceSelectionState::setup(Application * app){
app->getGui()->getSourcesEditor()->setup(); app->getGui()->getSourcesEditorWidget()->setSurfaceManager(app->getSurfaceManager());
app->getGui()->getSourcesEditorWidget()->setup();
} }
void SourceSelectionState::draw(Application * app){ void SourceSelectionState::draw(Application * app){
@ -22,8 +23,8 @@ void SourceSelectionState::draw(Application * app){
app->getSurfaceManager()->draw(); app->getSurfaceManager()->draw();
ofPopStyle(); ofPopStyle();
// TODO: Separate SourcesEditor from SurfaceManagerGui, make it a widget // TODO: Separate SourcesEditorWidget from SurfaceManagerGui, make it a widget
app->getGui()->getSourcesEditor()->draw(); app->getGui()->getSourcesEditorWidget()->draw();
Gui::instance()->getSurfaceHighlightWidget().setSurfaceManager(app->getSurfaceManager()); Gui::instance()->getSurfaceHighlightWidget().setSurfaceManager(app->getSurfaceManager());
Gui::instance()->getSurfaceHighlightWidget().draw(); Gui::instance()->getSurfaceHighlightWidget().draw();

2
src/Application/States/TextureMappingState.cpp

@ -129,7 +129,7 @@ void TextureMappingState::onKeyPressed(Application * app, ofKeyEventArgs & args)
app->getCmdManager()->exec( app->getCmdManager()->exec(
new SetNextSourceCmd( new SetNextSourceCmd(
app->getSurfaceManager()->getSelectedSurface(), app->getSurfaceManager()->getSelectedSurface(),
app->getGui()->getSourcesEditor())); app->getGui()->getSourcesEditorWidget()));
}else{ }else{
app->getCmdManager()->exec(new SelNextSurfaceCmd(app->getSurfaceManager())); app->getCmdManager()->exec(new SelNextSurfaceCmd(app->getSurfaceManager()));
} }

2
src/Commands/SetNextSourceCmd.cpp

@ -3,7 +3,7 @@
namespace ofx { namespace ofx {
namespace piMapper { namespace piMapper {
SetNextSourceCmd::SetNextSourceCmd(BaseSurface * surface, SourcesEditor * sourcesEditor){ SetNextSourceCmd::SetNextSourceCmd(BaseSurface * surface, SourcesEditorWidget * sourcesEditor){
_surface = surface; _surface = surface;
_sourcesEditor = sourcesEditor; _sourcesEditor = sourcesEditor;
} }

8
src/Commands/SetNextSourceCmd.h

@ -2,7 +2,7 @@
#include "BaseCmd.h" #include "BaseCmd.h"
#include "BaseSurface.h" #include "BaseSurface.h"
#include "SourcesEditor.h" #include "SourcesEditorWidget.h"
#include "MediaServer.h" #include "MediaServer.h"
namespace ofx { namespace ofx {
@ -13,18 +13,18 @@ struct SourceData {
string id; string id;
}; };
class SourcesEditor; class SourcesEditorWidget;
class SetNextSourceCmd : public BaseUndoCmd { class SetNextSourceCmd : public BaseUndoCmd {
public: public:
SetNextSourceCmd(BaseSurface * surface, SourcesEditor * sourcesEditor); SetNextSourceCmd(BaseSurface * surface, SourcesEditorWidget * sourcesEditor);
void exec(); void exec();
void undo(); void undo();
private: private:
BaseSurface * _surface; BaseSurface * _surface;
SourcesEditor * _sourcesEditor; SourcesEditorWidget * _sourcesEditor;
vector <SourceData> _sources; vector <SourceData> _sources;
int _sourceIndex; // Previous source index int _sourceIndex; // Previous source index
int _nextSourceIndex; int _nextSourceIndex;

2
src/Commands/SetSourceCmd.cpp

@ -6,7 +6,7 @@ namespace piMapper {
SetSourceCmd::SetSourceCmd(int sourceType, SetSourceCmd::SetSourceCmd(int sourceType,
string sourceId, string sourceId,
BaseSurface * surface, BaseSurface * surface,
SourcesEditor * sourcesEditor){ SourcesEditorWidget * sourcesEditor){
_sourceType = sourceType; _sourceType = sourceType;
_sourceId = sourceId; _sourceId = sourceId;

8
src/Commands/SetSourceCmd.h

@ -6,12 +6,12 @@
#include "BaseCmd.h" #include "BaseCmd.h"
#include "BaseSurface.h" #include "BaseSurface.h"
#include "SourcesEditor.h" #include "SourcesEditorWidget.h"
namespace ofx { namespace ofx {
namespace piMapper { namespace piMapper {
class SourcesEditor; class SourcesEditorWidget;
class SetSourceCmd : public BaseUndoCmd { class SetSourceCmd : public BaseUndoCmd {
@ -19,7 +19,7 @@ class SetSourceCmd : public BaseUndoCmd {
SetSourceCmd(int sourceType, SetSourceCmd(int sourceType,
string sourceId, string sourceId,
BaseSurface * surface, BaseSurface * surface,
SourcesEditor * sourcesEditor); SourcesEditorWidget * sourcesEditor);
void exec(); void exec();
void undo(); void undo();
@ -27,7 +27,7 @@ class SetSourceCmd : public BaseUndoCmd {
int _sourceType; int _sourceType;
string _sourceId; string _sourceId;
BaseSurface * _surface; BaseSurface * _surface;
SourcesEditor * _sourcesEditor; SourcesEditorWidget * _sourcesEditor;
int _oldSourceType; int _oldSourceType;
string _oldSourceId; string _oldSourceId;

4
src/Commands/TogglePerspectiveCmd.h

@ -2,12 +2,12 @@
#include "BaseCmd.h" #include "BaseCmd.h"
#include "QuadSurface.h" #include "QuadSurface.h"
#include "SourcesEditor.h" #include "SourcesEditorWidget.h"
namespace ofx { namespace ofx {
namespace piMapper { namespace piMapper {
class SourcesEditor; class SourcesEditorWidget;
class TogglePerspectiveCmd : public BaseUndoCmd { class TogglePerspectiveCmd : public BaseUndoCmd {

2
src/Surfaces/SurfaceManagerGui.cpp

@ -54,7 +54,7 @@ void SurfaceManagerGui::stopDrag(){
bDrag = false; bDrag = false;
} }
SourcesEditor * SurfaceManagerGui::getSourcesEditor(){ SourcesEditorWidget * SurfaceManagerGui::getSourcesEditorWidget(){
return &sourcesEditor; return &sourcesEditor;
} }

6
src/Surfaces/SurfaceManagerGui.h

@ -6,7 +6,7 @@
#include "ofGraphics.h" #include "ofGraphics.h"
#include "SurfaceManager.h" #include "SurfaceManager.h"
#include "SourcesEditor.h" #include "SourcesEditorWidget.h"
#include "GuiMode.h" #include "GuiMode.h"
#include "CmdManager.h" #include "CmdManager.h"
#include "SelSurfaceCmd.h" #include "SelSurfaceCmd.h"
@ -33,7 +33,7 @@ class SurfaceManagerGui {
void startDrag(); void startDrag();
void stopDrag(); void stopDrag();
SourcesEditor * getSourcesEditor(); SourcesEditorWidget * getSourcesEditorWidget();
ofVec2f clickPosition; ofVec2f clickPosition;
bool bDrag; bool bDrag;
@ -41,7 +41,7 @@ class SurfaceManagerGui {
private: private:
SurfaceManager * surfaceManager; SurfaceManager * surfaceManager;
MediaServer * mediaServer; MediaServer * mediaServer;
SourcesEditor sourcesEditor; SourcesEditorWidget sourcesEditor;
int guiMode; int guiMode;

134
src/UserInterface/SourcesEditor.cpp → src/UserInterface/SourcesEditorWidget.cpp

@ -1,9 +1,9 @@
#include "SourcesEditor.h" #include "SourcesEditorWidget.h"
namespace ofx { namespace ofx {
namespace piMapper { namespace piMapper {
SourcesEditor::SourcesEditor(){ SourcesEditorWidget::SourcesEditorWidget(){
mediaServer = 0; mediaServer = 0;
addMediaServerListeners(); addMediaServerListeners();
imageSelector = new RadioList(); imageSelector = new RadioList();
@ -11,7 +11,7 @@ SourcesEditor::SourcesEditor(){
fboSelector = new RadioList(); fboSelector = new RadioList();
} }
void SourcesEditor::setup(){ void SourcesEditorWidget::setup(){
int numImages = mediaServer->getNumImages(); int numImages = mediaServer->getNumImages();
int numVideos = mediaServer->getNumVideos(); int numVideos = mediaServer->getNumVideos();
int numFbos = mediaServer->getNumFboSources(); int numFbos = mediaServer->getNumFboSources();
@ -21,17 +21,17 @@ void SourcesEditor::setup(){
// Get image names from media server // Get image names from media server
vector <string> imageNames = mediaServer->getImageNames(); vector <string> imageNames = mediaServer->getImageNames();
imageSelector->setup("Images", imageNames, mediaServer->getImagePaths()); imageSelector->setup("Images", imageNames, mediaServer->getImagePaths());
ofAddListener(imageSelector->onRadioSelected, this, &SourcesEditor::handleImageSelected); ofAddListener(imageSelector->onRadioSelected, this, &SourcesEditorWidget::handleImageSelected);
} }
if(numVideos){ if(numVideos){
vector <string> videoNames = mediaServer->getVideoNames(); vector <string> videoNames = mediaServer->getVideoNames();
videoSelector->setup("Videos", videoNames, mediaServer->getVideoPaths()); videoSelector->setup("Videos", videoNames, mediaServer->getVideoPaths());
ofAddListener(videoSelector->onRadioSelected, this, &SourcesEditor::handleVideoSelected); ofAddListener(videoSelector->onRadioSelected, this, &SourcesEditorWidget::handleVideoSelected);
} }
if(numFbos){ if(numFbos){
vector <string> fboNames = mediaServer->getFboSourceNames(); vector <string> fboNames = mediaServer->getFboSourceNames();
fboSelector->setup("FBOs", fboNames, fboNames); fboSelector->setup("FBOs", fboNames, fboNames);
ofAddListener(fboSelector->onRadioSelected, this, &SourcesEditor::handleFboSelected); ofAddListener(fboSelector->onRadioSelected, this, &SourcesEditorWidget::handleFboSelected);
} }
// Align menus // Align menus
@ -51,7 +51,7 @@ void SourcesEditor::setup(){
} }
void SourcesEditor::draw(){ void SourcesEditorWidget::draw(){
// Don't draw if there is no source selected // Don't draw if there is no source selected
if(surfaceManager->getSelectedSurface() == 0){ if(surfaceManager->getSelectedSurface() == 0){
return; return;
@ -67,7 +67,7 @@ void SourcesEditor::draw(){
} }
} }
void SourcesEditor::disable(){ void SourcesEditorWidget::disable(){
if(imageSelector->size()){ if(imageSelector->size()){
imageSelector->disable(); imageSelector->disable();
} }
@ -79,10 +79,10 @@ void SourcesEditor::disable(){
} }
} }
void SourcesEditor::enable(){ void SourcesEditorWidget::enable(){
// Don't enable if there is no surface selected // Don't enable if there is no surface selected
if(surfaceManager->getSelectedSurface() == 0){ if(surfaceManager->getSelectedSurface() == 0){
ofLogNotice("SourcesEditor") << "No surface selected. Not enabling and not showing source list."; ofLogNotice("SourcesEditorWidget") << "No surface selected. Not enabling and not showing source list.";
return; return;
} }
if(imageSelector->size()){ if(imageSelector->size()){
@ -105,30 +105,30 @@ void SourcesEditor::enable(){
} }
} }
void SourcesEditor::setSurfaceManager(SurfaceManager * newSurfaceManager){ void SourcesEditorWidget::setSurfaceManager(SurfaceManager * newSurfaceManager){
surfaceManager = newSurfaceManager; surfaceManager = newSurfaceManager;
} }
void SourcesEditor::setCmdManager(CmdManager * cmdManager){ void SourcesEditorWidget::setCmdManager(CmdManager * cmdManager){
_cmdManager = cmdManager; _cmdManager = cmdManager;
} }
void SourcesEditor::setMediaServer(MediaServer * newMediaServer){ void SourcesEditorWidget::setMediaServer(MediaServer * newMediaServer){
if(newMediaServer == 0){ if(newMediaServer == 0){
ofLogFatalError("SourcesEditor") << "New media server is 0"; ofLogFatalError("SourcesEditorWidget") << "New media server is 0";
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
clearMediaServer(); clearMediaServer();
mediaServer = newMediaServer; mediaServer = newMediaServer;
} }
MediaServer * SourcesEditor::getMediaServer(){ MediaServer * SourcesEditorWidget::getMediaServer(){
return mediaServer; return mediaServer;
} }
void SourcesEditor::selectSourceRadioButton(string & sourcePath){ void SourcesEditorWidget::selectSourceRadioButton(string & sourcePath){
if(sourcePath == ""){ if(sourcePath == ""){
ofLogNotice("SourcesEditor") << "Path is empty"; ofLogNotice("SourcesEditorWidget") << "Path is empty";
if(imageSelector->size()){ if(imageSelector->size()){
imageSelector->unselectAll(); imageSelector->unselectAll();
} }
@ -157,65 +157,65 @@ void SourcesEditor::selectSourceRadioButton(string & sourcePath){
return; return;
} }
// Log warning if we are still here // Log warning if we are still here
ofLogWarning("SourcesEditor") << "Could not find option in any of the source lists"; ofLogWarning("SourcesEditorWidget") << "Could not find option in any of the source lists";
} }
} }
void SourcesEditor::addMediaServerListeners(){ void SourcesEditorWidget::addMediaServerListeners(){
// Check if the media server is valid // Check if the media server is valid
if(mediaServer == 0){ if(mediaServer == 0){
ofLogError("SourcesEditor::addMediaServerListeners", "Media server not set"); ofLogError("SourcesEditorWidget::addMediaServerListeners", "Media server not set");
return; return;
} }
// Add listeners to custom events of the media server // Add listeners to custom events of the media server
ofAddListener(mediaServer->onImageAdded, this, &SourcesEditor::handleImageAdded); ofAddListener(mediaServer->onImageAdded, this, &SourcesEditorWidget::handleImageAdded);
ofAddListener(mediaServer->onImageRemoved, this, &SourcesEditor::handleImageRemoved); ofAddListener(mediaServer->onImageRemoved, this, &SourcesEditorWidget::handleImageRemoved);
ofAddListener(mediaServer->onVideoAdded, this, &SourcesEditor::handleVideoAdded); ofAddListener(mediaServer->onVideoAdded, this, &SourcesEditorWidget::handleVideoAdded);
ofAddListener(mediaServer->onVideoRemoved, this, &SourcesEditor::handleVideoRemoved); ofAddListener(mediaServer->onVideoRemoved, this, &SourcesEditorWidget::handleVideoRemoved);
ofAddListener(mediaServer->onImageLoaded, this, &SourcesEditor::handleImageLoaded); ofAddListener(mediaServer->onImageLoaded, this, &SourcesEditorWidget::handleImageLoaded);
ofAddListener(mediaServer->onImageUnloaded, this, &SourcesEditor::handleImageUnloaded); ofAddListener(mediaServer->onImageUnloaded, this, &SourcesEditorWidget::handleImageUnloaded);
ofAddListener(mediaServer->onFboSourceAdded, this, &SourcesEditor::handleFboSourceAdded); ofAddListener(mediaServer->onFboSourceAdded, this, &SourcesEditorWidget::handleFboSourceAdded);
ofAddListener(mediaServer->onFboSourceRemoved, this, &SourcesEditor::handleFboSourceRemoved); ofAddListener(mediaServer->onFboSourceRemoved, this, &SourcesEditorWidget::handleFboSourceRemoved);
ofAddListener(mediaServer->onFboSourceLoaded, this, &SourcesEditor::handleFboSourceLoaded); ofAddListener(mediaServer->onFboSourceLoaded, this, &SourcesEditorWidget::handleFboSourceLoaded);
ofAddListener(mediaServer->onFboSourceUnloaded, this, &SourcesEditor::handleFboSourceUnloaded); ofAddListener(mediaServer->onFboSourceUnloaded, this, &SourcesEditorWidget::handleFboSourceUnloaded);
} }
void SourcesEditor::removeMediaServerListeners(){ void SourcesEditorWidget::removeMediaServerListeners(){
// Check if the media server is valid // Check if the media server is valid
if(mediaServer == 0){ if(mediaServer == 0){
ofLogError("SourcesEditor::addMediaServerListeners", "Media server not set"); ofLogError("SourcesEditorWidget::addMediaServerListeners", "Media server not set");
return; return;
} }
// Remove listeners to custom events of the media server // Remove listeners to custom events of the media server
ofRemoveListener(mediaServer->onImageAdded, this, &SourcesEditor::handleImageAdded); ofRemoveListener(mediaServer->onImageAdded, this, &SourcesEditorWidget::handleImageAdded);
ofRemoveListener(mediaServer->onImageRemoved, this, &SourcesEditor::handleImageRemoved); ofRemoveListener(mediaServer->onImageRemoved, this, &SourcesEditorWidget::handleImageRemoved);
ofRemoveListener(mediaServer->onVideoAdded, this, &SourcesEditor::handleVideoAdded); ofRemoveListener(mediaServer->onVideoAdded, this, &SourcesEditorWidget::handleVideoAdded);
ofRemoveListener(mediaServer->onVideoRemoved, this, &SourcesEditor::handleVideoRemoved); ofRemoveListener(mediaServer->onVideoRemoved, this, &SourcesEditorWidget::handleVideoRemoved);
ofRemoveListener(mediaServer->onImageLoaded, this, &SourcesEditor::handleImageLoaded); ofRemoveListener(mediaServer->onImageLoaded, this, &SourcesEditorWidget::handleImageLoaded);
ofRemoveListener(mediaServer->onImageUnloaded, this, &SourcesEditor::handleImageUnloaded); ofRemoveListener(mediaServer->onImageUnloaded, this, &SourcesEditorWidget::handleImageUnloaded);
ofRemoveListener(mediaServer->onFboSourceAdded, this, &SourcesEditor::handleFboSourceAdded); ofRemoveListener(mediaServer->onFboSourceAdded, this, &SourcesEditorWidget::handleFboSourceAdded);
ofRemoveListener(mediaServer->onFboSourceRemoved, this, &SourcesEditor::handleFboSourceRemoved); ofRemoveListener(mediaServer->onFboSourceRemoved, this, &SourcesEditorWidget::handleFboSourceRemoved);
ofRemoveListener(mediaServer->onFboSourceLoaded, this, &SourcesEditor::handleFboSourceLoaded); ofRemoveListener(mediaServer->onFboSourceLoaded, this, &SourcesEditorWidget::handleFboSourceLoaded);
ofRemoveListener(mediaServer->onFboSourceUnloaded, this, &SourcesEditor::handleFboSourceUnloaded); ofRemoveListener(mediaServer->onFboSourceUnloaded, this, &SourcesEditorWidget::handleFboSourceUnloaded);
} }
void SourcesEditor::handleImageSelected(string & imagePath){ void SourcesEditorWidget::handleImageSelected(string & imagePath){
_cmdManager->exec(new SetSourceCmd(SourceType::SOURCE_TYPE_IMAGE, _cmdManager->exec(new SetSourceCmd(SourceType::SOURCE_TYPE_IMAGE,
imagePath, imagePath,
surfaceManager->getSelectedSurface(), surfaceManager->getSelectedSurface(),
(SourcesEditor *)this)); (SourcesEditorWidget *)this));
} }
void SourcesEditor::setImageSource(string & imagePath){ void SourcesEditorWidget::setImageSource(string & imagePath){
// Unselect selected items // Unselect selected items
videoSelector->unselectAll(); videoSelector->unselectAll();
fboSelector->unselectAll(); fboSelector->unselectAll();
BaseSurface * surface = surfaceManager->getSelectedSurface(); BaseSurface * surface = surfaceManager->getSelectedSurface();
if(surface == 0){ if(surface == 0){
ofLogWarning("SourcesEditor") << "No surface selected"; ofLogWarning("SourcesEditorWidget") << "No surface selected";
return; return;
} }
@ -231,21 +231,21 @@ void SourcesEditor::setImageSource(string & imagePath){
surface->setSource(mediaServer->loadImage(imagePath)); surface->setSource(mediaServer->loadImage(imagePath));
} }
void SourcesEditor::handleVideoSelected(string & videoPath){ void SourcesEditorWidget::handleVideoSelected(string & videoPath){
_cmdManager->exec(new SetSourceCmd(SourceType::SOURCE_TYPE_VIDEO, _cmdManager->exec(new SetSourceCmd(SourceType::SOURCE_TYPE_VIDEO,
videoPath, videoPath,
surfaceManager->getSelectedSurface(), surfaceManager->getSelectedSurface(),
(SourcesEditor *)this)); (SourcesEditorWidget *)this));
} }
void SourcesEditor::setVideoSource(string & videoPath){ void SourcesEditorWidget::setVideoSource(string & videoPath){
// Unselect any selected items // Unselect any selected items
fboSelector->unselectAll(); fboSelector->unselectAll();
imageSelector->unselectAll(); imageSelector->unselectAll();
BaseSurface * surface = surfaceManager->getSelectedSurface(); BaseSurface * surface = surfaceManager->getSelectedSurface();
if(surface == 0){ if(surface == 0){
ofLogWarning("SourcesEditor") << "No surface selected"; ofLogWarning("SourcesEditorWidget") << "No surface selected";
return; return;
} }
@ -261,21 +261,21 @@ void SourcesEditor::setVideoSource(string & videoPath){
surface->setSource(mediaServer->loadVideo(videoPath)); surface->setSource(mediaServer->loadVideo(videoPath));
} }
void SourcesEditor::handleFboSelected(string & fboName){ void SourcesEditorWidget::handleFboSelected(string & fboName){
_cmdManager->exec(new SetSourceCmd(SourceType::SOURCE_TYPE_FBO, _cmdManager->exec(new SetSourceCmd(SourceType::SOURCE_TYPE_FBO,
fboName, fboName,
surfaceManager->getSelectedSurface(), surfaceManager->getSelectedSurface(),
(SourcesEditor *)this)); (SourcesEditorWidget *)this));
} }
void SourcesEditor::setFboSource(string & fboName){ void SourcesEditorWidget::setFboSource(string & fboName){
videoSelector->unselectAll(); videoSelector->unselectAll();
imageSelector->unselectAll(); imageSelector->unselectAll();
// Get selected surface // Get selected surface
BaseSurface * surface = surfaceManager->getSelectedSurface(); BaseSurface * surface = surfaceManager->getSelectedSurface();
if(surface == 0){ if(surface == 0){
ofLogWarning("SourcesEditor") << "No surface selected"; ofLogWarning("SourcesEditorWidget") << "No surface selected";
return; return;
} }
@ -291,7 +291,7 @@ void SourcesEditor::setFboSource(string & fboName){
surface->setSource(mediaServer->loadFboSource(fboName)); surface->setSource(mediaServer->loadFboSource(fboName));
} }
void SourcesEditor::clearSource(){ void SourcesEditorWidget::clearSource(){
BaseSurface * surface = surfaceManager->getSelectedSurface(); BaseSurface * surface = surfaceManager->getSelectedSurface();
// Unload old media // Unload old media
@ -306,7 +306,7 @@ void SourcesEditor::clearSource(){
surface->setSource(surface->getDefaultSource()); surface->setSource(surface->getDefaultSource());
} }
void SourcesEditor::clearMediaServer(){ void SourcesEditorWidget::clearMediaServer(){
if(mediaServer == 0){ if(mediaServer == 0){
return; return;
} }
@ -315,16 +315,16 @@ void SourcesEditor::clearMediaServer(){
mediaServer = 0; mediaServer = 0;
} }
void SourcesEditor::handleImageAdded(string & path){} void SourcesEditorWidget::handleImageAdded(string & path){}
void SourcesEditor::handleImageRemoved(string & path){} void SourcesEditorWidget::handleImageRemoved(string & path){}
void SourcesEditor::handleVideoAdded(string & path){} void SourcesEditorWidget::handleVideoAdded(string & path){}
void SourcesEditor::handleVideoRemoved(string & path){} void SourcesEditorWidget::handleVideoRemoved(string & path){}
void SourcesEditor::handleImageLoaded(string & path){} void SourcesEditorWidget::handleImageLoaded(string & path){}
void SourcesEditor::handleImageUnloaded(string & path){} void SourcesEditorWidget::handleImageUnloaded(string & path){}
void SourcesEditor::handleFboSourceAdded(string & name){} void SourcesEditorWidget::handleFboSourceAdded(string & name){}
void SourcesEditor::handleFboSourceRemoved(string & name){} void SourcesEditorWidget::handleFboSourceRemoved(string & name){}
void SourcesEditor::handleFboSourceLoaded(string & name){} void SourcesEditorWidget::handleFboSourceLoaded(string & name){}
void SourcesEditor::handleFboSourceUnloaded(string & name){} void SourcesEditorWidget::handleFboSourceUnloaded(string & name){}
} // namespace piMapper } // namespace piMapper
} // namespace ofx } // namespace ofx

4
src/UserInterface/SourcesEditor.h → src/UserInterface/SourcesEditorWidget.h

@ -11,9 +11,9 @@
namespace ofx { namespace ofx {
namespace piMapper { namespace piMapper {
class SourcesEditor { class SourcesEditorWidget {
public: public:
SourcesEditor(); SourcesEditorWidget();
void setup(); void setup();
void draw(); void draw();
Loading…
Cancel
Save