forked from AuroraMiddleware/gtk
df455db2e3
One requirement of .ui files is that each object must have an ID, even if it is never referred to or directly loaded from the code. This makes editing .ui files much more onerous than it has to be, due to the frequent need to invent new IDs, while avoiding clashes. This commit makes IDs optional in the XML. They only need to be provided for objects which are referred to or explictly loaded from the code. Since GtkBuilder needs IDs for its own internal accounting, we create IDs of the form ___object_N___ if not specified in the XML. https://bugzilla.gnome.org/show_bug.cgi?id=712553
93 lines
2.0 KiB
Plaintext
93 lines
2.0 KiB
Plaintext
start = element interface {
|
|
attribute domain { text } ?,
|
|
( requires | object | template | menu ) *
|
|
}
|
|
|
|
requires = element requires {
|
|
attribute lib { text },
|
|
attribute version { text }
|
|
}
|
|
|
|
object = element object {
|
|
attribute id { xsd:ID } ?,
|
|
attribute class { text },
|
|
attribute type-func { text } ?,
|
|
attribute constructor { text } ?,
|
|
(property | signal | child | ANY) *
|
|
}
|
|
|
|
template = element template {
|
|
attribute class { text },
|
|
attribute parent { text },
|
|
(property | signal | child | ANY) *
|
|
}
|
|
|
|
property = element property {
|
|
attribute name { text },
|
|
attribute translatable { "yes" | "no" } ?,
|
|
attribute comments { text } ?,
|
|
attribute context { text } ?,
|
|
text ?
|
|
}
|
|
|
|
signal = element signal {
|
|
attribute name { text },
|
|
attribute handler { text },
|
|
attribute after { text } ?,
|
|
attribute swapped { text } ?,
|
|
attribute object { text } ?,
|
|
attribute last_modification_time { text } ?,
|
|
empty
|
|
}
|
|
|
|
child = element child {
|
|
attribute type { text } ?,
|
|
attribute internal-child { text } ?,
|
|
(object | ANY)*
|
|
}
|
|
|
|
menu = element menu {
|
|
attribute id { xsd:ID },
|
|
attribute domain { text } ?,
|
|
(item | submenu | section) *
|
|
}
|
|
|
|
item = element item {
|
|
attribute id { xsd:ID } ?,
|
|
(attribute_ | link) *
|
|
}
|
|
|
|
attribute_ = element attribute {
|
|
attribute name { text },
|
|
attribute type { text } ?,
|
|
attribute translatable { "yes" | "no" } ?,
|
|
attribute context { text } ?,
|
|
attribute comments { text } ?,
|
|
text ?
|
|
}
|
|
|
|
link = element link {
|
|
attribute id { xsd:ID } ?,
|
|
attribute name { text },
|
|
item *
|
|
}
|
|
|
|
submenu = element submenu {
|
|
attribute id { xsd:ID } ?,
|
|
(attribute_ | item | submenu | section) *
|
|
}
|
|
|
|
section = element section {
|
|
attribute id { xsd:ID } ?,
|
|
(attribute_ | item | submenu | section) *
|
|
}
|
|
|
|
ANY = element * - (interface | requires | object | template | property | signal | child | menu | item | attribute | link | submenu | section) {
|
|
attribute * { text } *,
|
|
(ALL * & text ?)
|
|
}
|
|
ALL = element * {
|
|
attribute * { text } *,
|
|
(ALL * & text ?)
|
|
}
|