Hi, how can I view the structure and contents of a GUI layout such as a window?
I can access a window layout using api.gui.util.getById(id), and I can add elements to it using :getContent() :getItem() :getLayout() :getTab() etc, but how to do view the structure and contents already in the layout?
When I try :getContent() etc, I get a screenful of "generic" results that appear to be a list of the class member functions, but I see no specific info for the actual object entity (or subclass) that I am examining. For example for this Line window, it doesn't show how many items are in the layout, what is in those items, how many tabs, what components, etc. How do I view that structure?
Code
>> a = api.gui.util.getById("temp.view.entity_33671")
>> a:getContent()
{
new = nil,
__doc__ = {
new = "(String orientation[HORIZONTAL; VERTICAL]) -> BoxLayout",
addItem = "(AbstractLayout self, ILayoutItem item) -> Nil",
setGravity = "(LayoutBase self, Number horizontal, Number vertical) -> LayoutBase",
insertItem = "(AbstractLayout self, ILayoutItem item, Number pos) -> Nil",
removeItem = "(ILayout self, ILayoutItem layout) -> Object",
setId = "(LayoutBase self, String id) -> Nil",
getItem = "(ILayout self, Number index) -> Object",
setName = "(LayoutBase self, String name) -> Nil",
getComponent = "(LayoutBase self) -> Component",
getId = "(ILayoutItem self) -> String",
getNumItems = "(ILayout self) -> Number",
destroy = "(ILayoutItem self) -> Nil",
},
}
Alles anzeigen