Exemplo n.º 1
0
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();
}
Exemplo n.º 2
0
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 );
	}
}
Exemplo n.º 3
0
LuaReference::LuaReference()
{
	m_iReference = LUA_NOREF;
	m_Subscribers.Subscribe( this );
}
Exemplo n.º 4
0
LuaBinding::LuaBinding()
{
	m_Subscribers.Subscribe( this );
}
Exemplo n.º 5
0
void PrefsManager::Subscribe( IPreference *p )
{
    m_Subscribers.Subscribe( p );
}