Config stub
This commit is contained in:
parent
14d1836209
commit
4722656c7d
@ -1,22 +1,51 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
// Padding returns the amount of internal padding elements should have. An
|
type Config interface {
|
||||||
// element's inner content (such as text) should be inset by this amount,
|
// Padding returns the amount of internal padding elements should have.
|
||||||
// in addition to the inset returned by the pattern of its background. When
|
// An element's inner content (such as text) should be inset by this
|
||||||
// using the aforementioned inset values to calculate the element's minimum size
|
// amount, in addition to the inset returned by the pattern of its
|
||||||
// or the position and alignment of its content, all parameters in the
|
// background.
|
||||||
// PatternState should be unset except for Case.
|
Padding () int
|
||||||
func Padding () int {
|
|
||||||
|
// Margin returns how much space should be put in between elements.
|
||||||
|
Margin () int
|
||||||
|
|
||||||
|
// HandleWidth returns how large grab handles should typically be. This
|
||||||
|
// is important for accessibility reasons.
|
||||||
|
HandleWidth () int
|
||||||
|
|
||||||
|
// ScrollVelocity returns how many pixels should be scrolled every time
|
||||||
|
// a scroll button is pressed.
|
||||||
|
ScrollVelocity () int
|
||||||
|
|
||||||
|
// ThemePath returns the directory path to the theme.
|
||||||
|
ThemePath () string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default specifies default configuration values.
|
||||||
|
type Default struct { }
|
||||||
|
|
||||||
|
// Padding returns the default padding value.
|
||||||
|
func (Default) Padding () int {
|
||||||
return 7
|
return 7
|
||||||
}
|
}
|
||||||
|
|
||||||
// Margin returns how much space should be put in between elements.
|
// Margin returns the default margin value.
|
||||||
func Margin () int {
|
func (Default) Margin () int {
|
||||||
return 8
|
return 8
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleWidth returns how large grab handles should typically be. This is
|
// HandleWidth returns the default handle width value.
|
||||||
// important for accessibility reasons.
|
func (Default) HandleWidth () int {
|
||||||
func HandleWidth () int {
|
|
||||||
return 16
|
return 16
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ScrollVelocity returns the default scroll velocity value.
|
||||||
|
func (Default) ScrollVelocity () int {
|
||||||
|
return 16
|
||||||
|
}
|
||||||
|
|
||||||
|
// ThemePath returns the default theme path.
|
||||||
|
func (Default) ThemePath () (string) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
9
config/parse.go
Normal file
9
config/parse.go
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package config
|
||||||
|
|
||||||
|
import "io"
|
||||||
|
|
||||||
|
// Parse parses a configuration file and returns it as a Config.
|
||||||
|
func Parse (source io.Reader) (config Config) {
|
||||||
|
// TODO
|
||||||
|
return Default { }
|
||||||
|
}
|
Reference in New Issue
Block a user