You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ovdCConnectorEditor.h 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. #include "ovd_base.h"
  3. #include <string>
  4. namespace OpenViBE {
  5. namespace Designer {
  6. class CConnectorEditor final
  7. {
  8. public:
  9. CConnectorEditor(const Kernel::IKernelContext& ctx, Kernel::IBox& box, const size_t type, const size_t index, const char* title, const char* guiFilename)
  10. : m_Box(box), m_kernelCtx(ctx), m_type(type), m_index(index), m_guiFilename(guiFilename), m_title(title ? title : "") { }
  11. ~CConnectorEditor() = default;
  12. bool run();
  13. Kernel::IBox& m_Box;
  14. GtkEntry* m_IDEntry = nullptr;
  15. protected:
  16. const Kernel::IKernelContext& m_kernelCtx;
  17. size_t m_type = 0;
  18. size_t m_index = 0;
  19. const std::string m_guiFilename;
  20. const std::string m_title;
  21. typedef bool (Kernel::IBox::*get_identifier_t)(size_t index, CIdentifier& identifier) const;
  22. typedef bool (Kernel::IBox::*get_type_t)(size_t index, CIdentifier& typeID) const;
  23. typedef bool (Kernel::IBox::*get_name_t)(size_t index, CString& name) const;
  24. typedef bool (Kernel::IBox::*set_type_t)(size_t index, const CIdentifier& typeID);
  25. typedef bool (Kernel::IBox::*set_name_t)(size_t index, const CString& name);
  26. typedef bool (Kernel::IBox::*is_type_supported_t)(const CIdentifier& typeID) const;
  27. typedef bool (Kernel::IBox::*update_identifier_t)(size_t index, const CIdentifier& newID);
  28. };
  29. } //namespace Designer
  30. } //namespace OpenViBE