44#if SO3_WEB_NAVIGATOR_BUILD == 1
68 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetCreate\n");
71 int z = MTOI(MMpull(m));
72 int h = MTOI(MMpull(m));
73 int w = MTOI(MMpull(m));
74 int topPos = MTOI(MMpull(m));
75 int leftPos = MTOI(MMpull(m));
80 if ((s == NIL) || (vp == NIL) || (nam == NIL) || (
w == NIL) || (h == NIL) || (z == NIL))
86 SScene* scene = MMgetPointer<SScene*>(m, MTOP(s));
93 SViewPort* viewport = MMgetPointer<SViewPort*>(m, MTOP(vp));
101 std::string name(MMstartstr(m, MTOP(nam)));
110 if (
w >= 5000 || h >= 5000)
112 MMechostr(MSKDEBUG,
"too bigger values \n");
117 SWebNavigatorWidget* webNavigatorWidget = 0;
120 webNavigatorWidget =
static_cast<SWebNavigatorWidget*
> (SWidgetManager::getSingleton().CreateWidget(scene, name, leftPos, topPos,
w, h, viewport, z, SO3_WEB_NAVIGATOR_WIDGET_TYPE));
122 catch (Ogre::Exception &e)
124 MMechostr(MSKDEBUG,
"An exception has occurred while creating web navigator widget: %s\n", e.what());
132 MMset(m, 0, MMfetch(m, p, OFFOBJCHN));
134 if ((MMpushPointer(m, webNavigatorWidget) != 0))
136 SWidgetManager::getSingleton().DeleteWidget(webNavigatorWidget);
141 return OBJcreate(m,
SO3WIDGET, SCOL_PTR webNavigatorWidget,
SO3VPTYPE, SCOL_PTR viewport);
167 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetCreateBackground\n");
170 int h = MTOI(MMpull(m));
171 int w = MTOI(MMpull(m));
172 int topPos = MTOI(MMpull(m));
173 int leftPos = MTOI(MMpull(m));
178 if ((s == NIL) || (vp == NIL) || (nam == NIL) || (
w == NIL) || (h == NIL))
184 SScene* scene = MMgetPointer<SScene*>(m, MTOP(s));
191 SViewPort* viewport = MMgetPointer<SViewPort*>(m, MTOP(vp));
192 if (viewport == NULL)
199 std::string name(MMstartstr(m, MTOP(nam)));
208 if (
w >= 5000 || h >= 5000)
210 MMechostr(MSKDEBUG,
"too bigger values \n");
215 SWebNavigatorWidget* webNavigatorWidget = 0;
218 webNavigatorWidget =
static_cast<SWebNavigatorWidget*
> (SWidgetManager::getSingleton().CreateWidget(scene, name, leftPos, topPos,
w, h, viewport, SO3_WEB_NAVIGATOR_WIDGET_TYPE));
220 catch (Ogre::Exception &e)
222 MMechostr(MSKDEBUG,
"An exception has occurred while creating web navigator widget: %s\n", e.what());
230 MMset(m, 0, MMfetch(m, p, OFFOBJCHN));
232 if ((MMpushPointer(m, webNavigatorWidget) != 0))
234 SWidgetManager::getSingleton().DeleteWidget(webNavigatorWidget);
239 return OBJcreate(m,
SO3WIDGET, SCOL_PTR webNavigatorWidget,
SO3VPTYPE, SCOL_PTR viewport);
267 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetCreateOnMaterial\n");
269 int index = MTOI(MMpull(m));
270 int pass = MTOI(MMpull(m));
271 int tec = MTOI(MMpull(m));
277 if ((s == NIL) || (mat == NIL) || (tec == NIL) || (pass == NIL) || (index == NIL) || (
w == NIL) || (h == NIL) || (n == NIL))
283 SScene* scene = MMgetPointer<SScene*>(m, MTOP(s));
290 SMaterial* material = MMgetPointer<SMaterial*>(m, MTOP(mat));
291 if (material == NULL)
298 if (material->GetAssociatedWidget() != 0)
300 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetCreateOnMaterial : %s already have a widget on it!\n", material->GetName().c_str());
305 std::string name(MMstartstr(m, MTOP(n)));
313 if (!strcmp(
"BaseWhite", material->getOgreMaterialPointer()->getName().c_str()))
315 Ogre::LogManager::getSingleton().logMessage(
"Can't load web navigator widget: Material BaseWhite is Protected!", Ogre::LML_CRITICAL,
true);
316 MMechostr(MSKDEBUG,
"Material BaseWhite is Protected \n");
321 if (material->GetNumTechniques() < tec + 1)
323 Ogre::LogManager::getSingleton().logMessage(
"Can't load web navigator widget: Material has not enough Technique! ", Ogre::LML_CRITICAL,
true);
328 if ((material->getOgreMaterialPointer()->getTechnique(tec)->getNumPasses()) < pass + 1)
330 Ogre::LogManager::getSingleton().logMessage(
"Can't load web navigator widget: Material has not enough Pass! ", Ogre::LML_CRITICAL,
true);
335 if ((material->getOgreMaterialPointer()->getTechnique(tec)->getPass(pass)->getNumTextureUnitStates()) == 0)
337 Ogre::LogManager::getSingleton().logMessage(
"Can't load web navigator widget: Material has not enough Texture! ", Ogre::LML_CRITICAL,
true);
342 if ((material->getOgreMaterialPointer()->getTechnique(tec)->getPass(pass)->getNumTextureUnitStates()) < index + 1)
344 Ogre::LogManager::getSingleton().logMessage(
"Can't load web navigator widget: Material has not enough Texture! ", Ogre::LML_CRITICAL,
true);
349 SWebNavigatorWidget* webNavigatorWidget = 0;
352 webNavigatorWidget =
static_cast<SWebNavigatorWidget*
> (SWidgetManager::getSingleton().CreateWidget(scene, name, MTOI(
w), MTOI(h), material, tec, pass, index, SO3_WEB_NAVIGATOR_WIDGET_TYPE));
354 catch (Ogre::Exception &e)
356 MMechostr(MSKDEBUG,
"An exception has occurred while creating web navigator widget: %s\n", e.what());
364 MMset(m, 0, MMfetch(m, p, OFFOBJCHN));
366 if ((MMpushPointer(m, webNavigatorWidget) != 0))
368 SWidgetManager::getSingleton().DeleteWidget(webNavigatorWidget);
394 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetLoadHTML\n");
397 int scolHtml = MMpull(m);
398 int scolWidget = MMget(m, 0);
399 if ((scolWidget == NIL) || (scolHtml == NIL))
406 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
409 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
415 const char* html = MMstartstr(m, MTOP(scolHtml));
418 MMechostr(MSKDEBUG,
"Html content is NULL \n");
423 if (!strcmp(
"", html))
425 MMechostr(MSKDEBUG,
"Html content is NULL \n");
431 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
433 MMechostr(MSKDEBUG,
"bad widget type \n");
437 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
442 webNavigatorWidget->LoadHTML(std::string(html));
444 catch (
const Ogre::Exception& e)
446 MMechostr(MSKDEBUG,
"An error occurs while trying to load a html content on a widget: %s\n", e.what());
450 MMset(m, 0, ITOM(1));
466 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionUndo\n");
469 int scolFrameName = MMpull(m);
470 int scolWidget = MMget(m, 0);
471 if (scolWidget == NIL)
473 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionUndo: Invalid parameters!\n");
479 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
482 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
488 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
490 MMechostr(MSKDEBUG,
"bad widget type \n");
494 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
497 std::string frameName =
"";
498 if (scolFrameName != NIL)
499 frameName = MMstartstr(m, MTOP(scolFrameName));
501 webNavigatorWidget->Undo(frameName);
502 MMset(m, 0, ITOM(1));
518 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionRedo\n");
521 int scolFrameName = MMpull(m);
522 int scolWidget = MMget(m, 0);
523 if (scolWidget == NIL)
525 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionRedo: Invalid parameters!\n");
531 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
534 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
540 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
542 MMechostr(MSKDEBUG,
"bad widget type \n");
546 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
549 std::string frameName =
"";
550 if (scolFrameName != NIL)
551 frameName = MMstartstr(m, MTOP(scolFrameName));
553 webNavigatorWidget->Redo(frameName);
554 MMset(m, 0, ITOM(1));
570 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionCut\n");
573 int scolFrameName = MMpull(m);
574 int scolWidget = MMget(m, 0);
575 if (scolWidget == NIL)
577 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionCut: Invalid parameters!\n");
583 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
586 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
592 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
594 MMechostr(MSKDEBUG,
"bad widget type \n");
598 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
601 std::string frameName =
"";
602 if (scolFrameName != NIL)
603 frameName = MMstartstr(m, MTOP(scolFrameName));
605 webNavigatorWidget->Cut(frameName);
606 MMset(m, 0, ITOM(1));
622 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionCopy\n");
625 int scolFrameName = MMpull(m);
626 int scolWidget = MMget(m, 0);
627 if (scolWidget == NIL)
629 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionCopy: Invalid parameters!\n");
635 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
638 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
644 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
646 MMechostr(MSKDEBUG,
"bad widget type \n");
650 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
653 std::string frameName =
"";
654 if (scolFrameName != NIL)
655 frameName = MMstartstr(m, MTOP(scolFrameName));
657 webNavigatorWidget->Copy(frameName);
658 MMset(m, 0, ITOM(1));
674 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionPaste\n");
677 int scolFrameName = MMpull(m);
678 int scolWidget = MMget(m, 0);
679 if (scolWidget == NIL)
681 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionPaste: Invalid parameters!\n");
687 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
690 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
696 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
698 MMechostr(MSKDEBUG,
"bad widget type \n");
702 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
705 std::string frameName =
"";
706 if (scolFrameName != NIL)
707 frameName = MMstartstr(m, MTOP(scolFrameName));
709 webNavigatorWidget->Paste(frameName);
710 MMset(m, 0, ITOM(1));
726 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionDelete\n");
729 int scolFrameName = MMpull(m);
730 int scolWidget = MMget(m, 0);
731 if (scolWidget == NIL)
733 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionDelete: Invalid parameters!\n");
739 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
742 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
748 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
750 MMechostr(MSKDEBUG,
"bad widget type \n");
754 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
757 std::string frameName =
"";
758 if (scolFrameName != NIL)
759 frameName = MMstartstr(m, MTOP(scolFrameName));
761 webNavigatorWidget->Delete(frameName);
762 MMset(m, 0, ITOM(1));
778 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionSelectAll\n");
781 int scolFrameName = MMpull(m);
782 int scolWidget = MMget(m, 0);
783 if (scolWidget == NIL)
785 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetActionSelectAll: Invalid parameters!\n");
791 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
794 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
800 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
802 MMechostr(MSKDEBUG,
"bad widget type \n");
806 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
809 std::string frameName =
"";
810 if (scolFrameName != NIL)
811 frameName = MMstartstr(m, MTOP(scolFrameName));
813 webNavigatorWidget->SelectAll(frameName);
814 MMset(m, 0, ITOM(1));
830 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetPrint\n");
833 int scolFrameName = MMpull(m);
834 int scolWidget = MMget(m, 0);
835 if (scolWidget == NIL)
837 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetPrint: Invalid parameters!\n");
843 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
846 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
852 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
854 MMechostr(MSKDEBUG,
"bad widget type \n");
858 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
861 std::string frameName =
"";
862 if (scolFrameName != NIL)
863 frameName = MMstartstr(m, MTOP(scolFrameName));
865 webNavigatorWidget->Print(frameName);
866 MMset(m, 0, ITOM(1));
882 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetViewSource\n");
885 int scolFrameName = MMpull(m);
886 int scolWidget = MMget(m, 0);
887 if (scolWidget == NIL)
889 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetViewSource: Invalid parameters!\n");
895 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
898 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
904 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
906 MMechostr(MSKDEBUG,
"bad widget type \n");
910 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
913 std::string frameName =
"";
914 if (scolFrameName != NIL)
915 frameName = MMstartstr(m, MTOP(scolFrameName));
917 webNavigatorWidget->ViewSource(frameName);
918 MMset(m, 0, ITOM(1));
934 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGetSource\n");
937 int scolFrameName = MMpull(m);
938 int scolWidget = MMpull(m);
939 if (scolWidget == NIL)
941 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGetSource: Invalid parameters!\n");
947 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
950 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
956 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
958 MMechostr(MSKDEBUG,
"bad widget type \n");
962 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
965 std::string frameName =
"";
966 if (scolFrameName != NIL)
967 frameName = MMstartstr(m, MTOP(scolFrameName));
969 std::string frameSource = webNavigatorWidget->GetSource(frameName);
970 return Mpushstrbloc(m, (
char*)(frameSource.c_str()));
986 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGetText\n");
989 int scolFrameName = MMpull(m);
990 int scolWidget = MMpull(m);
991 if (scolWidget == NIL)
993 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGetText: Invalid parameters!\n");
999 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1002 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1008 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1010 MMechostr(MSKDEBUG,
"bad widget type \n");
1014 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1017 std::string frameName =
"";
1018 if (scolFrameName != NIL)
1019 frameName = MMstartstr(m, MTOP(scolFrameName));
1021 std::string frameText = webNavigatorWidget->GetText(frameName);
1022 return Mpushstrbloc(m, (
char*)(frameText.c_str()));
1039 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGetURL\n");
1042 int scolFrameName = MMpull(m);
1043 int scolWidget = MMpull(m);
1044 if (scolWidget == NIL)
1046 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGetURL: Invalid parameters!\n");
1052 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1055 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1061 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1063 MMechostr(MSKDEBUG,
"bad widget type \n");
1067 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1070 std::string frameName =
"";
1071 if (scolFrameName != NIL)
1072 frameName = MMstartstr(m, MTOP(scolFrameName));
1074 std::string url = webNavigatorWidget->GetURL(frameName);
1075 return Mpushstrbloc(m, (
char*)(url.c_str()));
1090 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetCanGoBack\n");
1093 int scolWidget = MMget(m, 0);
1094 if (scolWidget == NIL)
1096 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetCanGoBack: Invalid parameters!\n");
1102 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1105 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1111 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1113 MMechostr(MSKDEBUG,
"bad widget type \n");
1117 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1119 if (webNavigatorWidget->CanGoBack())
1120 MMset(m, 0, ITOM(1));
1122 MMset(m, 0, ITOM(0));
1137 MMechostr(MSKDEBUG,
"WebNavigatorGoBack\n");
1140 int scolWidget = MMget(m, 0);
1141 if (scolWidget == NIL)
1143 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGoBack: Invalid parameters!\n");
1149 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1152 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1158 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1160 MMechostr(MSKDEBUG,
"bad widget type \n");
1164 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1166 webNavigatorWidget->GoBack();
1167 MMset(m, 0, ITOM(1));
1182 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetCanGoForward\n");
1185 int scolWidget = MMget(m, 0);
1186 if (scolWidget == NIL)
1188 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetCanGoForward: Invalid parameters!\n");
1194 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1197 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1203 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1205 MMechostr(MSKDEBUG,
"bad widget type \n");
1209 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1211 if (webNavigatorWidget->CanGoForward())
1212 MMset(m, 0, ITOM(1));
1214 MMset(m, 0, ITOM(0));
1229 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGoForward\n");
1232 int scolWidget = MMget(m, 0);
1233 if (scolWidget == NIL)
1235 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGoForward: Invalid parameters!\n");
1241 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1244 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1250 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1252 MMechostr(MSKDEBUG,
"bad widget type \n");
1256 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1258 webNavigatorWidget->GoForward();
1259 MMset(m, 0, ITOM(1));
1274 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetReload\n");
1277 int scolWidget = MMget(m, 0);
1278 if (scolWidget == NIL)
1280 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetReload: Invalid parameters!\n");
1286 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1289 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1295 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1297 MMechostr(MSKDEBUG,
"bad widget type \n");
1301 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1303 webNavigatorWidget->Reload();
1304 MMset(m, 0, ITOM(1));
1319 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetReloadIgnoreCache\n");
1322 int scolWidget = MMget(m, 0);
1323 if (scolWidget == NIL)
1325 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetReloadIgnoreCache: Invalid parameters!\n");
1331 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1334 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1340 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1342 MMechostr(MSKDEBUG,
"bad widget type \n");
1346 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1348 webNavigatorWidget->ReloadIgnoreCache();
1349 MMset(m, 0, ITOM(1));
1364 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetStopLoad\n");
1367 int scolWidget = MMget(m, 0);
1368 if (scolWidget == NIL)
1370 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetStopLoad: Invalid parameters!\n");
1376 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1379 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1385 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1387 MMechostr(MSKDEBUG,
"bad widget type \n");
1391 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1393 webNavigatorWidget->StopLoad();
1394 MMset(m, 0, ITOM(1));
1414 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetFind\n");
1417 int scolFirstSearch = MMpull(m);
1418 int scolCaseSensitive = MMpull(m);
1419 int scolSearchForward = MMpull(m);
1420 int scolSearchedText = MMpull(m);
1421 int scolSearchIdentifier = MMpull(m);
1422 int scolWidget = MMget(m, 0);
1423 if ((scolWidget == NIL) || (scolSearchedText == NIL) || (scolSearchIdentifier == NIL))
1425 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetFind: Invalid parameters!\n");
1431 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1434 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1440 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1442 MMechostr(MSKDEBUG,
"bad widget type \n");
1446 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1449 int searchIdentifier = MTOI(scolSearchIdentifier);
1452 std::string searchedText = MMstartstr(m, MTOP(scolSearchedText));
1455 bool searchForward =
true;
1456 if (scolSearchForward != NIL)
1457 if (MTOI(scolSearchForward) == 0)
1458 searchForward =
false;
1461 bool caseSensitive =
false;
1462 if (scolCaseSensitive != NIL)
1463 if (MTOI(scolCaseSensitive) == 0)
1464 caseSensitive =
true;
1467 bool firstSearch =
true;
1468 if (scolFirstSearch != NIL)
1469 if (MTOI(scolFirstSearch) == 0)
1470 firstSearch =
false;
1473 webNavigatorWidget->Find(searchIdentifier, searchedText, searchForward, caseSensitive, firstSearch);
1474 MMset(m, 0, ITOM(1));
1490 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetStopFinding\n");
1493 int scolClearSelection = MMpull(m);
1494 int scolWidget = MMget(m, 0);
1495 if (scolWidget == NIL)
1497 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetStopFinding: Invalid parameters!\n");
1503 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1506 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1512 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1514 MMechostr(MSKDEBUG,
"bad widget type \n");
1518 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1520 bool clearSelection =
false;
1521 if (scolClearSelection != NIL)
1522 if (MTOI(scolClearSelection) == 1)
1523 clearSelection =
true;
1525 webNavigatorWidget->StopFinding(clearSelection);
1526 MMset(m, 0, ITOM(1));
1541 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGetZoomLevel\n");
1544 int scolWidget = MMget(m, 0);
1545 if (scolWidget == NIL)
1547 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetGetZoomLevel: Invalid parameters!\n");
1553 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1556 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1562 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1564 MMechostr(MSKDEBUG,
"bad widget type \n");
1568 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1570 float zoomLevel = webNavigatorWidget->GetZoomLevel();
1571 MMset(m, 0, FTOM(zoomLevel));
1587 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetSetZoomLevel\n");
1590 int scolZoomLevel = MMpull(m);
1591 int scolWidget = MMget(m, 0);
1592 if ((scolWidget == NIL) || (scolZoomLevel == NIL))
1594 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetSetZoomLevel: Invalid parameters!\n");
1600 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1603 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1609 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1611 MMechostr(MSKDEBUG,
"bad widget type \n");
1615 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1617 float zoomLevel = MTOF(scolZoomLevel);
1618 webNavigatorWidget->SetZoomLevel(zoomLevel);
1619 MMset(m, 0, ITOM(1));
1634 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetClearHistory\n");
1637 int scolWidget = MMget(m, 0);
1638 if (scolWidget == NIL)
1640 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetClearHistory: Invalid parameters!\n");
1646 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1649 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1655 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1657 MMechostr(MSKDEBUG,
"bad widget type \n");
1661 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1663 webNavigatorWidget->ClearHistory();
1664 MMset(m, 0, ITOM(1));
1679 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetShowDevTools\n");
1682 int scolWidget = MMget(m, 0);
1683 if (scolWidget == NIL)
1685 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetShowDevTools: Invalid parameters!\n");
1691 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1694 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1700 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1702 MMechostr(MSKDEBUG,
"bad widget type \n");
1706 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1708 webNavigatorWidget->ShowDevTools();
1709 MMset(m, 0, ITOM(1));
1724 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetCloseDevTools\n");
1726 int scolWidget = MMget(m, 0);
1727 if (scolWidget == NIL)
1729 MMechostr(MSKDEBUG,
"SO3WebNavigatorWidgetCloseDevTools: Invalid parameters!\n");
1735 SWidget* widget = MMgetPointer<SWidget*>(m, MTOP(scolWidget));
1738 MMechostr(MSKDEBUG,
"widget instance is NULL \n");
1744 if (widget->GetType() != SO3_WEB_NAVIGATOR_WIDGET_TYPE)
1746 MMechostr(MSKDEBUG,
"bad widget type \n");
1750 SWebNavigatorWidget* webNavigatorWidget =
static_cast<SWebNavigatorWidget*
>(widget);
1752 webNavigatorWidget->CloseDevTools();
1753 MMset(m, 0, ITOM(1));
MMechostr(MSKDEBUG, " > Start loading Plugin SO3Engine dll\n")
SCOL_EXPORT int cbmachine w