theme.go
func SysObject(object string) string {
	thememtx.RLock()
	sch, ok := themeManager.themes[themeManager.current]
	if !ok {
		sch = themeManager.themes[defaultTheme]
	}
	thememtx.RUnlock()

	obj, okobj := sch.objects[object]
	if !okobj {
		visited := make(map[string]int, 0)
		visited[themeManager.current] = 1
		if !ok {
			visited[defaultTheme] = 1
		}

		for {
			if sch.parent == "" {
				break
			}

			themeManager.loadTheme(sch.parent)
			thememtx.RLock()
			sch = themeManager.themes[sch.parent]
			obj, okobj = sch.objects[object]
			thememtx.RUnlock()

			if ok {
				break
			} else {
				if _, okSch := visited[sch.parent]; okSch {
					panic("Object: " + object + ". Theme loop detected: " + sch.title + " --> " + sch.parent)
				} else {
					visited[sch.parent] = 1
				}
			}
		}
	}

	return obj
}
func SysObject(object string) string {
	thememtx.RLock()
	sch, ok := themeManager.themes[themeManager.current]
	if !ok {
		sch = themeManager.themes[defaultTheme]
	}
	thememtx.RUnlock()

	obj, okobj := sch.objects[object]
	if !okobj {
		visited := make(map[string]int, 0)
		visited[themeManager.current] = 1
		if !ok {
			visited[defaultTheme] = 1
		}

		for {
			if sch.parent == "" {
				break
			}

			themeManager.loadTheme(sch.parent)
			thememtx.RLock()
			sch = themeManager.themes[sch.parent]
			obj, okobj = sch.objects[object]
			thememtx.RUnlock()

			if ok {
				break
			} else {
				if _, okSch := visited[sch.parent]; okSch {
					panic("Object: " + object + ". Theme loop detected: " + sch.title + " --> " + sch.parent)
				} else {
					visited[sch.parent] = 1
				}
			}
		}
	}

	return obj
}
func SysObject ( object string ) string { thememtx . RLock ( ) sch , ok := themeManager . themes [ themeManager . current ] if ! ok { sch = themeManager . themes [ defaultTheme ] } thememtx . RUnlock ( ) obj , okobj := sch . objects [ object ] if ! okobj { visited := make ( map [ string ] int , 0 ) visited [ themeManager . current ] = 1 if ! ok { visited [ defaultTheme ] = 1 } for { if sch . parent == " " { break } themeManager . loadTheme ( sch . parent ) thememtx . RLock ( ) sch = themeManager . themes [ sch . parent ] obj , okobj = sch . objects [ object ] thememtx . RUnlock ( ) if ok { break } else { if _ , okSch := visited [ sch . parent ] ; okSch { panic ( " " + object + " " + sch . title + " " + sch . parent ) } else { visited [ sch . parent ] = 1 } } } } return obj }
// SysObject returns object look by its id for the current
// theme. E.g, border lines for frame or arrows for scrollbar.
// The method panics if theme loop is detected - check if
// parent attribute is correct
SysObject returns object look by its id for the current theme . E . g border lines for frame or arrows for scrollbar . The method panics if theme loop is detected - check if parent attribute is correct