FlightGear next
|
#include "config.h"
#include "NasalCanvas.hxx"
#include <Canvas/canvas_mgr.hxx>
#include <Canvas/gui_mgr.hxx>
#include <Main/globals.hxx>
#include <Scripting/NasalCondition.hxx>
#include <Scripting/NasalSys.hxx>
#include <osgGA/GUIEventAdapter>
#include <simgear/sg_inlines.h>
#include <simgear/canvas/Canvas.hxx>
#include <simgear/canvas/CanvasWindow.hxx>
#include <simgear/canvas/elements/CanvasElement.hxx>
#include <simgear/canvas/elements/CanvasText.hxx>
#include <simgear/canvas/events/CanvasKeyBinding.hxx>
#include <simgear/canvas/events/CustomEvent.hxx>
#include <simgear/canvas/events/KeyboardEvent.hxx>
#include <simgear/canvas/events/MouseEvent.hxx>
#include <simgear/canvas/layout/BoxLayout.hxx>
#include <simgear/canvas/layout/GridLayout.hxx>
#include <simgear/canvas/layout/NasalWidget.hxx>
#include <simgear/canvas/layout/SpacerItem.hxx>
#include <simgear/nasal/cppbind/from_nasal.hxx>
#include <simgear/nasal/cppbind/to_nasal.hxx>
#include <simgear/nasal/cppbind/NasalHash.hxx>
#include <simgear/nasal/cppbind/Ghost.hxx>
#include <simgear/canvas/layout/AlignFlag_values.hxx>
Go to the source code of this file.
Classes | |
struct | CustomEventDetailWrapper |
Macros | |
#define | ALIGN_ENUM_MAPPING(key, val, comment) |
Typedefs | |
typedef nasal::Ghost< sc::EventPtr > | NasalEvent |
typedef nasal::Ghost< sc::CustomEventPtr > | NasalCustomEvent |
typedef nasal::Ghost< sc::DeviceEventPtr > | NasalDeviceEvent |
typedef nasal::Ghost< sc::KeyboardEventPtr > | NasalKeyboardEvent |
typedef nasal::Ghost< sc::MouseEventPtr > | NasalMouseEvent |
typedef nasal::Ghost< sc::KeyBindingRef > | NasalKeyBinding |
typedef SGSharedPtr< CustomEventDetailWrapper > | CustomEventDetailPtr |
typedef nasal::Ghost< CustomEventDetailPtr > | NasalCustomEventDetail |
typedef nasal::Ghost< simgear::PropertyBasedElementPtr > | NasalPropertyBasedElement |
typedef nasal::Ghost< sc::CanvasPtr > | NasalCanvas |
typedef nasal::Ghost< sc::ElementPtr > | NasalElement |
typedef nasal::Ghost< sc::GroupPtr > | NasalGroup |
typedef nasal::Ghost< sc::TextPtr > | NasalText |
typedef nasal::Ghost< sc::ImagePtr > | NasalImage |
typedef nasal::Ghost< sc::LayoutItemRef > | NasalLayoutItem |
typedef nasal::Ghost< sc::LayoutRef > | NasalLayout |
typedef nasal::Ghost< sc::BoxLayoutRef > | NasalBoxLayout |
typedef nasal::Ghost< sc::GridLayoutRef > | NasalGridLayout |
using | NasalSpacerItem = nasal::Ghost<sc::SpacerItemRef> |
typedef nasal::Ghost< sc::WindowPtr > | NasalWindow |
Functions | |
naRef | propNodeGhostCreate (naContext c, SGPropertyNode *n) |
template<class Element> | |
naRef | elementGetNode (Element &element, naContext c) |
naRef | to_nasal_helper (naContext c, const osg::BoundingBox &bb) |
SGPropertyNode * | from_nasal_helper (naContext c, naRef ref, SGPropertyNode **) |
CanvasMgr & | requireCanvasMgr (const nasal::ContextWrapper &ctx) |
GUIMgr & | requireGUIMgr (const nasal::ContextWrapper &ctx) |
static naRef | f_createCanvas (const nasal::CallContext &ctx) |
Create new Canvas and get ghost for it. | |
static naRef | f_createWindow (const nasal::CallContext &ctx) |
Create new Window and get ghost for it. | |
static naRef | f_getCanvas (const nasal::CallContext &ctx) |
Get ghost for existing Canvas. | |
naRef | f_canvasCreateGroup (sc::Canvas &canvas, const nasal::CallContext &ctx) |
naRef | f_getDesktop (const nasal::CallContext &ctx) |
Get group containing all gui windows. | |
naRef | f_setInputFocus (const nasal::CallContext &ctx) |
naRef | f_grabPointer (const nasal::CallContext &ctx) |
naRef | f_ungrabPointer (const nasal::CallContext &ctx) |
static naRef | f_groupCreateChild (sc::Group &group, const nasal::CallContext &ctx) |
static sc::ElementPtr | f_groupGetChild (sc::Group &group, SGPropertyNode *node) |
static naRef | f_groupAddKeyBinding (sc::Group &group, const nasal::CallContext &ctx) |
static naRef | f_windowAddKeyBinding (sc::Window &window, const nasal::CallContext &ctx) |
static void | propElementSetData (simgear::PropertyBasedElement &el, const std::string &name, const nasal::ContextWrapper &ctx, naRef ref) |
static naRef | f_propElementData (simgear::PropertyBasedElement &el, const nasal::CallContext &ctx) |
Accessor for HTML5 data properties. | |
static naRef | f_createCustomEvent (const nasal::CallContext &ctx) |
static naRef | f_customEventGetDetail (sc::CustomEvent &event, naContext c) |
static naRef | f_layoutItemSetVisible (sc::LayoutItem &item, const nasal::CallContext &ctx) |
static naRef | f_boxLayoutAddItem (sc::BoxLayout &box, const nasal::CallContext &ctx) |
static naRef | f_boxLayoutInsertItem (sc::BoxLayout &box, const nasal::CallContext &ctx) |
static naRef | f_boxLayoutAddStretch (sc::BoxLayout &box, const nasal::CallContext &ctx) |
static naRef | f_boxLayoutInsertStretch (sc::BoxLayout &box, const nasal::CallContext &ctx) |
template<class Type, class Base> | |
static naRef | f_newAsBase (const nasal::CallContext &ctx) |
static naRef | f_imageFillRect (sc::Image &img, const nasal::CallContext &ctx) |
static naRef | f_imageSetPixel (sc::Image &img, const nasal::CallContext &ctx) |
static naRef | f_canvasImageSize (sc::Image &img, const nasal::CallContext &ctx) |
static naRef | f_gridLayoutAddItem (sc::GridLayout &grid, const nasal::CallContext &ctx) |
static naRef | f_newGridLayout (const nasal::CallContext &ctx) |
static naRef | f_newSpacerItem (const nasal::CallContext &ctx) |
static naRef | f_keyBindingAddBinding (sc::KeyBinding &keyBinding, const nasal::CallContext &ctx) |
static naRef | f_newKeyBinding (const nasal::CallContext &ctx) |
naRef | initNasalCanvas (naRef globals, naContext c) |
#define ALIGN_ENUM_MAPPING | ( | key, | |
val, | |||
comment ) |
typedef SGSharedPtr<CustomEventDetailWrapper> CustomEventDetailPtr |
Definition at line 70 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::BoxLayoutRef> NasalBoxLayout |
Definition at line 82 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::CanvasPtr> NasalCanvas |
Definition at line 74 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::CustomEventPtr> NasalCustomEvent |
Definition at line 63 of file NasalCanvas.cxx.
typedef nasal::Ghost<CustomEventDetailPtr> NasalCustomEventDetail |
Definition at line 71 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::DeviceEventPtr> NasalDeviceEvent |
Definition at line 64 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::ElementPtr> NasalElement |
Definition at line 75 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::EventPtr> NasalEvent |
Definition at line 62 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::GridLayoutRef> NasalGridLayout |
Definition at line 83 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::GroupPtr> NasalGroup |
Definition at line 76 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::ImagePtr> NasalImage |
Definition at line 78 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::KeyBindingRef> NasalKeyBinding |
Definition at line 67 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::KeyboardEventPtr> NasalKeyboardEvent |
Definition at line 65 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::LayoutRef> NasalLayout |
Definition at line 81 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::LayoutItemRef> NasalLayoutItem |
Definition at line 80 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::MouseEventPtr> NasalMouseEvent |
Definition at line 66 of file NasalCanvas.cxx.
typedef nasal::Ghost<simgear::PropertyBasedElementPtr> NasalPropertyBasedElement |
Definition at line 73 of file NasalCanvas.cxx.
using NasalSpacerItem = nasal::Ghost<sc::SpacerItemRef> |
Definition at line 84 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::TextPtr> NasalText |
Definition at line 77 of file NasalCanvas.cxx.
typedef nasal::Ghost<sc::WindowPtr> NasalWindow |
Definition at line 86 of file NasalCanvas.cxx.
Definition at line 57 of file NasalCanvas.cxx.
|
static |
Definition at line 388 of file NasalCanvas.cxx.
|
static |
Definition at line 416 of file NasalCanvas.cxx.
|
static |
Definition at line 401 of file NasalCanvas.cxx.
|
static |
Definition at line 422 of file NasalCanvas.cxx.
naRef f_canvasCreateGroup | ( | sc::Canvas & | canvas, |
const nasal::CallContext & | ctx ) |
Definition at line 173 of file NasalCanvas.cxx.
|
static |
Definition at line 459 of file NasalCanvas.cxx.
|
static |
Create new Canvas and get ghost for it.
Definition at line 129 of file NasalCanvas.cxx.
|
static |
Definition at line 314 of file NasalCanvas.cxx.
|
static |
Create new Window and get ghost for it.
Definition at line 137 of file NasalCanvas.cxx.
|
static |
Definition at line 372 of file NasalCanvas.cxx.
|
static |
Get ghost for existing Canvas.
Definition at line 148 of file NasalCanvas.cxx.
naRef f_getDesktop | ( | const nasal::CallContext & | ctx | ) |
Get group containing all gui windows.
Definition at line 181 of file NasalCanvas.cxx.
naRef f_grabPointer | ( | const nasal::CallContext & | ctx | ) |
Definition at line 192 of file NasalCanvas.cxx.
|
static |
Definition at line 471 of file NasalCanvas.cxx.
|
static |
Definition at line 216 of file NasalCanvas.cxx.
|
static |
Definition at line 205 of file NasalCanvas.cxx.
|
static |
Definition at line 211 of file NasalCanvas.cxx.
|
static |
Definition at line 436 of file NasalCanvas.cxx.
|
static |
Definition at line 447 of file NasalCanvas.cxx.
|
static |
Definition at line 498 of file NasalCanvas.cxx.
|
static |
Definition at line 381 of file NasalCanvas.cxx.
|
static |
Definition at line 431 of file NasalCanvas.cxx.
|
static |
Definition at line 488 of file NasalCanvas.cxx.
|
static |
Definition at line 505 of file NasalCanvas.cxx.
|
static |
Definition at line 493 of file NasalCanvas.cxx.
|
static |
Accessor for HTML5 data properties.
el.data("myKey", 5);
el.data({myProp1: 12, myProp2: "test"});
el.data("myKey"); # 5 el.data("myProp2"); # "test"
el.data("myKey", nil);
el.data({myProp1: nil, myProp2: nil});
el.data({newProp: "some text...", removeProp: nil});
Definition at line 278 of file NasalCanvas.cxx.
naRef f_setInputFocus | ( | const nasal::CallContext & | ctx | ) |
Definition at line 186 of file NasalCanvas.cxx.
naRef f_ungrabPointer | ( | const nasal::CallContext & | ctx | ) |
Definition at line 199 of file NasalCanvas.cxx.
|
static |
Definition at line 223 of file NasalCanvas.cxx.
SGPropertyNode * from_nasal_helper | ( | naContext | c, |
naRef | ref, | ||
SGPropertyNode ** | ) |
Definition at line 99 of file NasalCanvas.cxx.
naRef initNasalCanvas | ( | naRef | globals, |
naContext | c ) |
Definition at line 510 of file NasalCanvas.cxx.
|
static |
Definition at line 230 of file NasalCanvas.cxx.
|
extern |
Definition at line 36 of file nasal-props.cxx.
CanvasMgr & requireCanvasMgr | ( | const nasal::ContextWrapper & | ctx | ) |
Definition at line 108 of file NasalCanvas.cxx.
GUIMgr & requireGUIMgr | ( | const nasal::ContextWrapper & | ctx | ) |
Definition at line 117 of file NasalCanvas.cxx.
naRef to_nasal_helper | ( | naContext | c, |
const osg::BoundingBox & | bb ) |
Definition at line 88 of file NasalCanvas.cxx.