]> git.mxchange.org Git - flightgear.git/commitdiff
Nasal: expose canvas height-for-width layouting methods.
authorThomas Geymayer <tomgey@gmail.com>
Thu, 12 Jun 2014 22:09:33 +0000 (00:09 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Thu, 12 Jun 2014 22:09:33 +0000 (00:09 +0200)
src/Scripting/NasalCanvas.cxx

index 1e603a804f8129676ca3ff454507f436221d00f8..40039de199a3f9419f8b7fecb098f7216def215b 100644 (file)
@@ -463,6 +463,7 @@ naRef initNasalCanvas(naRef globals, naContext c)
     .method("_getElementById", &sc::Group::getElementById);
   NasalText::init("canvas.Text")
     .bases<NasalElement>()
+    .method("heightForWidth", &sc::Text::heightForWidth)
     .method("getNearestCursor", &sc::Text::getNearestCursor);
 
   //----------------------------------------------------------------------------
@@ -476,6 +477,9 @@ naRef initNasalCanvas(naRef globals, naContext c)
     .method("sizeHint", &sc::LayoutItem::sizeHint)
     .method("minimumSize", &sc::LayoutItem::minimumSize)
     .method("maximumSize", &sc::LayoutItem::maximumSize)
+    .method("hasHeightForWidth", &sc::LayoutItem::hasHeightForWidth)
+    .method("heightForWidth", &sc::LayoutItem::heightForWidth)
+    .method("minimumHeightForWidth", &sc::LayoutItem::minimumHeightForWidth)
     .method("setGeometry", &sc::LayoutItem::setGeometry)
     .method("geometry", &sc::LayoutItem::geometry);
   sc::NasalWidget::setupGhost(canvas_module);