mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
ide: Fixed to be SO buildable
git-svn-id: svn://ultimatepp.org/upp/trunk@13003 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5a2994d78b
commit
0833cadefd
25 changed files with 452 additions and 394 deletions
|
|
@ -1,7 +1,9 @@
|
|||
description "Various small(er) designers (Image viewer, QTF editor, ...)\377B";
|
||||
|
||||
uses
|
||||
HexView;
|
||||
HexView,
|
||||
ide/IconDes,
|
||||
ide/Common;
|
||||
|
||||
file
|
||||
Designers.h,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include <ide/ide.h>
|
||||
#include "Designers.h"
|
||||
|
||||
JsonViewDes::JsonViewDes()
|
||||
{
|
||||
|
|
@ -48,21 +48,21 @@ int JsonViewDes::AddNode(int parent_id, const Value& id, const String& name, con
|
|||
else
|
||||
if(v.Is<ValueMap>()) {
|
||||
ValueMap m = v;
|
||||
parent_id = tree.Add(parent_id, IdeImg::JsonStruct(), id, "[G1 [* " + name);
|
||||
parent_id = tree.Add(parent_id, IdeCommonImg::JsonStruct(), id, "[G1 [* " + name);
|
||||
for(int i = 0; i < m.GetCount(); i++)
|
||||
AddNode(parent_id, m.GetKey(i), "[@B \1" + String(m.GetKey(i)) + "\1:]", m.GetValue(i));
|
||||
}
|
||||
else
|
||||
if(v.Is<ValueArray>()) {
|
||||
parent_id = tree.Add(parent_id, IdeImg::JsonArray(), id, "[G1 [* " + name);
|
||||
parent_id = tree.Add(parent_id, IdeCommonImg::JsonArray(), id, "[G1 [* " + name);
|
||||
for(int i = 0; i < v.GetCount(); i++)
|
||||
AddNode(parent_id, i, "[@c " + AsString(i) + ":]", v[i]);
|
||||
}
|
||||
else {
|
||||
String qtf = "[G1 [* " + name + "]";
|
||||
Image img = IdeImg::JsonNumber();
|
||||
Image img = IdeCommonImg::JsonNumber();
|
||||
if(IsString(v)) {
|
||||
img = IdeImg::JsonString();
|
||||
img = IdeCommonImg::JsonString();
|
||||
if(IsNull(v))
|
||||
qtf << "[*@g Null";
|
||||
else
|
||||
|
|
@ -70,7 +70,7 @@ int JsonViewDes::AddNode(int parent_id, const Value& id, const String& name, con
|
|||
}
|
||||
else {
|
||||
if(v.Is<bool>())
|
||||
img = IdeImg::JsonBool();
|
||||
img = IdeCommonImg::JsonBool();
|
||||
if(IsNull(v))
|
||||
qtf << "[*@g Null";
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include <ide/ide.h>
|
||||
#include "Designers.h"
|
||||
|
||||
void XmlViewDes::CopyPath()
|
||||
{
|
||||
|
|
@ -39,7 +39,7 @@ void XmlViewDes::Load0(int parent, XmlParser& p)
|
|||
String txt = tag;
|
||||
for(int i = 0; i < p.GetAttrCount(); i++)
|
||||
txt << ' ' << p.GetAttr(i) << "=\"" << p[i] << "\"";
|
||||
parent = tree.Add(parent, IdeImg::XmlTag(), tag, txt);
|
||||
parent = tree.Add(parent, IdeCommonImg::XmlTag(), tag, txt);
|
||||
while(!p.End()) {
|
||||
if(p.IsEof())
|
||||
throw XmlError("Unexpected end of text");
|
||||
|
|
@ -48,16 +48,16 @@ void XmlViewDes::Load0(int parent, XmlParser& p)
|
|||
}
|
||||
else
|
||||
if(p.IsText())
|
||||
tree.Add(parent, IdeImg::XmlText(), Null, NormalizeSpaces(p.ReadText()));
|
||||
tree.Add(parent, IdeCommonImg::XmlText(), Null, NormalizeSpaces(p.ReadText()));
|
||||
else
|
||||
if(p.IsPI())
|
||||
tree.Add(parent, IdeImg::XmlPI(), Null, NormalizeSpaces(p.ReadPI()));
|
||||
tree.Add(parent, IdeCommonImg::XmlPI(), Null, NormalizeSpaces(p.ReadPI()));
|
||||
else
|
||||
if(p.IsDecl())
|
||||
tree.Add(parent, IdeImg::XmlDecl(), Null, NormalizeSpaces(p.ReadDecl()));
|
||||
tree.Add(parent, IdeCommonImg::XmlDecl(), Null, NormalizeSpaces(p.ReadDecl()));
|
||||
else
|
||||
if(p.IsComment())
|
||||
tree.Add(parent, IdeImg::XmlComment(), Null, NormalizeSpaces(p.ReadComment()));
|
||||
tree.Add(parent, IdeCommonImg::XmlComment(), Null, NormalizeSpaces(p.ReadComment()));
|
||||
else
|
||||
throw XmlError("Unexpected input");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue