74
75
double m_Frecuencia;
77
GNC::WidgetsManager::WidgetsManager(GNC::GCS::IVista* pVista):GNC::GCS::IWidgetsManager(pVista) {
78
GNC::WidgetsManager::WidgetsManager(GNC::GCS::IVista* pVista):GNC::GCS::IWidgetsManager(pVista), m_pAnnotator(new GNC::GCS::IAnnotator(pVista))
78
80
m_pRendererActivo = NULL;
79
81
m_cursor = GNC::GCS::Widgets::CUR_FLECHA;
80
82
m_mouseDerechoDown = false;
81
83
m_mouseIzquierdoDown = false;
82
84
m_pTimerAnimation = new TimerAnimation(this);
86
GNC::GCS::Widgets::WAnotador* pW = new GNC::GCS::Widgets::WAnotador(this,-1,"",-1);
88
GNC::GCS::Widgets::WAnotacionPosicion* pPosicion = new GNC::GCS::Widgets::WAnotacionPosicion(this,-1,"",-1);
89
InsertarWidget(pPosicion);
90
GNC::GCS::Widgets::WStaticRule* pStaticRule = new GNC::GCS::Widgets::WStaticRule(this,-1,"",-1);
91
InsertarWidget(pStaticRule);
85
94
GNC::WidgetsManager::~WidgetsManager() {
953
962
//----------------------------------------------------------------------------------------------------
954
963
//region "Interfaz general"
955
void GNC::WidgetsManager::CrearWidgetAnotador(GNC::GCS::IAnotador* pAnotador)
957
GNC::GCS::Widgets::WAnotador* pW = new GNC::GCS::Widgets::WAnotador(pAnotador,this,-1,"",-1);
959
GNC::GCS::Widgets::WAnotacionPosicion* pPosicion = new GNC::GCS::Widgets::WAnotacionPosicion(pAnotador,this,-1,"",-1);
960
InsertarWidget(pPosicion);
961
GNC::GCS::Widgets::WStaticRule* pStaticRule = new GNC::GCS::Widgets::WStaticRule(this,-1,"",-1);
962
InsertarWidget(pStaticRule);
965
void GNC::WidgetsManager::EnableAnotacionDinamica(bool /*enable*/)
967
//buscamos los widgets anotadores y los establecemos el modo
968
for( GNC::GCS::ListaWidgets::iterator it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
969
GNC::GCS::Widgets::IWidget* w = *it;
970
if (w->GetVID() == -1 && w->GetGID() == -1) {
971
//GNC::GCS::Widgets::WAnotador* pAnotador = dynamic_cast<GNC::GCS::Widgets::WAnotador*> (w);
976
void GNC::WidgetsManager::MostrarOcultarAnotador()
965
void GNC::WidgetsManager::SetAnnotator(const GNC::GCS::Ptr<GNC::GCS::IAnnotator>& pAnnotador)
967
m_pAnnotator = pAnnotador;
972
const GNC::GCS::Ptr<GNC::GCS::IAnnotator>& GNC::WidgetsManager::GetAnnotator()
977
void GNC::WidgetsManager::ShowAnnotations(bool show)
978
979
//buscamos los widgets anotadores y los establecemos el modo
979
980
for( GNC::GCS::ListaWidgets::iterator it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
981
982
if (w->GetVID() == -1 && w->GetGID() == -1) {
982
983
GNC::GCS::Widgets::WAnotador* pAnotador = dynamic_cast<GNC::GCS::Widgets::WAnotador*> (w);
983
984
if (pAnotador != NULL) {
984
pAnotador->Ocultar(!pAnotador->EstaOculto());
985
pAnotador->Ocultar(!show);
986
987
GNC::GCS::Widgets::WStaticRule* pStaticRule = dynamic_cast<GNC::GCS::Widgets::WStaticRule*> (w);
987
988
if (pStaticRule != NULL) {
988
pStaticRule->Ocultar(!pStaticRule->EstaOculto());
989
pStaticRule->Ocultar(!show);
995
bool GNC::WidgetsManager::IsVisibleAnotador()
996
bool GNC::WidgetsManager::IsShownAnnotations()
997
998
for( GNC::GCS::ListaWidgets::iterator it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
998
999
GNC::GCS::Widgets::IWidget* w = *it;