void ThemeManager::Subscribe( IThemeMetric *p ) { g_Subscribers.Subscribe( p ); // It's ThemeManager's responsibility to make sure all of its subscribers // are updated with current data. If a metric is created after // a theme is loaded, ThemeManager should update it right away (not just // when the theme changes). if( THEME && THEME->GetCurThemeName().size() ) p->Read(); }
LuaReference::LuaReference( const LuaReference &cpy ) { m_Subscribers.Subscribe( this ); if( cpy.m_iReference == LUA_NOREF ) m_iReference = LUA_NOREF; else { /* Make a new reference. */ Lua *L = LUA->Get(); lua_rawgeti( L, LUA_REGISTRYINDEX, cpy.m_iReference ); m_iReference = luaL_ref( L, LUA_REGISTRYINDEX ); LUA->Release( L ); } }
LuaReference::LuaReference() { m_iReference = LUA_NOREF; m_Subscribers.Subscribe( this ); }
LuaBinding::LuaBinding() { m_Subscribers.Subscribe( this ); }
void PrefsManager::Subscribe( IPreference *p ) { m_Subscribers.Subscribe( p ); }