31 lines
687 B
Go
31 lines
687 B
Go
|
package filter
|
||
|
|
||
|
import (
|
||
|
"github.com/yohamta/donburi/component"
|
||
|
"github.com/yohamta/donburi/filter"
|
||
|
)
|
||
|
|
||
|
type LayoutFilter = filter.LayoutFilter
|
||
|
|
||
|
// 包含所有指定组件的匹配布局
|
||
|
func Contains(components ...component.IComponentType) LayoutFilter {
|
||
|
return filter.Contains(components...)
|
||
|
}
|
||
|
|
||
|
func And(filters ...LayoutFilter) LayoutFilter {
|
||
|
return filter.And(filters...)
|
||
|
}
|
||
|
|
||
|
// 完全匹配包含指定的完全相同组件的布局
|
||
|
func Exact(components []component.IComponentType) LayoutFilter {
|
||
|
return filter.Exact(components)
|
||
|
}
|
||
|
|
||
|
func Not(f LayoutFilter) LayoutFilter {
|
||
|
return filter.Not(f)
|
||
|
}
|
||
|
|
||
|
func Or(filters ...LayoutFilter) LayoutFilter {
|
||
|
return filter.Or(filters...)
|
||
|
}
|