`)
viewHTML(value, buffer)
buffer.WriteString("
")
}
}
detailsView.viewsContainerData.htmlSubviews(self, buffer)
}
func (detailsView *detailsViewData) handleCommand(self View, command PropertyName, data DataObject) bool {
if command == "details-open" {
if n, ok := dataIntProperty(data, "open"); ok {
detailsView.properties[Expanded] = (n != 0)
if listener, ok := detailsView.changeListener[Expanded]; ok {
listener(detailsView, Expanded)
}
}
return true
}
return detailsView.viewsContainerData.handleCommand(self, command, data)
}
// GetDetailsSummary returns a value of the Summary property of DetailsView.
// If the second argument (subviewID) is not specified or it is "" then a value from the first argument (view) is returned.
func GetDetailsSummary(view View, subviewID ...string) View {
if len(subviewID) > 0 && subviewID[0] != "" {
view = ViewByID(view, subviewID[0])
}
if view != nil {
if value := view.Get(Summary); value != nil {
switch value := value.(type) {
case string:
return NewTextView(view.Session(), Params{Text: value})
case View:
return value
}
}
}
return nil
}
// IsDetailsExpanded returns a value of the Expanded property of DetailsView.
// If the second argument (subviewID) is not specified or it is "" then a value from the first argument (view) is returned.
func IsDetailsExpanded(view View, subviewID ...string) bool {
return boolStyledProperty(view, subviewID, Expanded, false)
}