Beginning to add visual mode.

This commit is contained in:
jevering 1998-05-14 22:16:36 +00:00
parent c22d8277e2
commit a749276c9d
3 changed files with 7 additions and 2 deletions

View File

@ -43,6 +43,7 @@
#define VIEWER_DUMP_VIEWS 40024
#define VIEWER_DUMP_STYLE 40025
#define VIEWER_DEBUGROBOT 40026
#define VIEWER_DEBUGROBOT_UPDATE 40027
// Note: must be in ascending sequential order
#define VIEWER_ONE_COLUMN 40031

View File

@ -67,6 +67,7 @@ VIEWER MENU DISCARDABLE
MENUITEM "Dump &Style", VIEWER_DUMP_STYLE
MENUITEM SEPARATOR
MENUITEM "Debu&g Robot", VIEWER_DEBUGROBOT
MENUITEM "&Visual Debug Robot", VIEWER_DEBUGROBOT_UPDATE
}
POPUP "&Tools"
{

View File

@ -51,7 +51,7 @@
#include "nsDocLoader.h"
// DebugRobot call
extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList);
extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList, nsIWebWidget * ww);
// Selection Repaint includes
#include "nsIPresShell.h"
@ -379,6 +379,7 @@ long PASCAL
WndProc(HWND hWnd, UINT msg, WPARAM param, LPARAM lparam)
{
HMENU hMenu;
PRBool bVisual = PR_FALSE;
if (msg == WM_CREATE) {
LPCREATESTRUCT lpcs = (LPCREATESTRUCT) lparam;
@ -462,6 +463,8 @@ WndProc(HWND hWnd, UINT msg, WPARAM param, LPARAM lparam)
wd->ww->DumpStyle();
}
break;
case VIEWER_DEBUGROBOT_UPDATE:
bVisual = PR_TRUE;
case VIEWER_DEBUGROBOT:
if ((nsnull != wd) && (nsnull != wd->ww)) {
nsIDocument* doc = wd->ww->GetDocument();
@ -469,7 +472,7 @@ WndProc(HWND hWnd, UINT msg, WPARAM param, LPARAM lparam)
const char * str = doc->GetDocumentURL()->GetSpec();
nsVoidArray * gWorkList = new nsVoidArray();
gWorkList->AppendElement(new nsString(str));
DebugRobot(gWorkList);
DebugRobot(gWorkList, bVisual ? wd->ww : nsnull);
}
}
break;