Esempio n. 1
0
void InlineBox::showBox(int printedCharacters) const
{
    printedCharacters += fprintf(stderr, "%s\t%p", boxName(), this);
    for (; printedCharacters < showTreeCharacterOffset; printedCharacters++)
        fputc(' ', stderr);
    fprintf(stderr, "\t%s %p\n", renderer() ? renderer()->renderName() : "No Renderer", renderer());
}
Esempio n. 2
0
void InlineBox::showBox(int printedCharacters) const
{
    printedCharacters += fprintf(stderr, "%s\t%p", boxName(), this);
    for (; printedCharacters < showTreeCharacterOffset; printedCharacters++)
        fputc(' ', stderr);
    fprintf(stderr, "\t%s %p {pos=%g,%g size=%g,%g} baseline=%i/%i\n",
        renderer().renderName(), &renderer(), x(), y(), width(), height(),
        baselinePosition(AlphabeticBaseline),
        baselinePosition(IdeographicBaseline));
}
Esempio n. 3
0
void InlineBox::showBox(int printedCharacters) const
{
    printedCharacters += fprintf(stderr, "%s %p", boxName(), this);
    for (; printedCharacters < showTreeCharacterOffset; printedCharacters++)
        fputc(' ', stderr);
    fprintf(stderr, "\t%s %p {pos=%g,%g size=%g,%g} baseline=%i/%i\n",
        layoutObject().decoratedName().ascii().data(), &layoutObject(),
        x().toFloat(), y().toFloat(), width().toFloat(), height().toFloat(),
        baselinePosition(AlphabeticBaseline), baselinePosition(IdeographicBaseline));
}
Esempio n. 4
0
void InlineBox::showLineBox(bool mark, int depth) const
{
    fprintf(stderr, "------- --");
    int printedCharacters = 0;
    if (mark) {
        fprintf(stderr, "*");
        ++printedCharacters;
    }
    while (++printedCharacters <= depth * 2)
        fputc(' ', stderr);
    fprintf(stderr, "%s  (%.2f, %.2f) (%.2f, %.2f) (%p)\n", boxName(), x(), y(), width(), height(), this);
}
void InlineTextBox::showBox(int printedCharacters) const
{
    String value = text();
    value.replaceWithLiteral('\\', "\\\\");
    value.replaceWithLiteral('\n', "\\n");
    printedCharacters += fprintf(stderr, "%s %p", boxName(), this);
    for (; printedCharacters < showTreeCharacterOffset; printedCharacters++)
        fputc(' ', stderr);
    const LineLayoutText obj = lineLayoutItem();
    printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer());
    const int layoutObjectCharacterOffset = 75;
    for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++)
        fputc(' ', stderr);
    fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().data());
}
 bool WindowsManager::addBox (const char* boxNameCorba,
         const float boxSize1,
         const float boxSize2,
         const float boxSize3,
         const value_type* colorCorba)
 {
     std::string boxName (boxNameCorba);
     if (nodes_.find (boxName) != nodes_.end ()) {
         std::cout << "You need to chose an other name, \"" << boxName
             << "\" already exist." << std::endl;
         return false;
     }
     else {
         mtx_.lock();
         LeafNodeBoxPtr_t box = LeafNodeBox::create
             (boxName, osgVector3 (boxSize1, boxSize2, boxSize3),
              getColor (colorCorba));
         WindowsManager::initParent (boxName, box);
         addNode (boxName, box);
         mtx_.unlock();
         return true;
     }
 }
Esempio n. 7
0
String InlineBox::debugName() const
{
    return boxName();
}
String InlineTextBox::debugName() const
{
    return String(boxName()) + " '" + text() + "'";
}
Esempio n. 9
0
void AddBoxDialog::slotNameChanged(QString)
{
	addButton->setEnabled(!boxName().isEmpty());
}