Added surface tool

This commit is contained in:
Vulpovile
2021-03-15 01:53:25 -07:00
parent c27a56b42f
commit 0e3968acd4
9 changed files with 106 additions and 36 deletions

View File

@@ -135,8 +135,8 @@ Application::Application(HWND parentWindow) : _propWindow(NULL) { //: GApp(setti
webBrowser = new IEBrowser(_hwndToolbox);
SetProp(_hwndToolbox,"Browser",(HANDLE)webBrowser);
navigateToolbox("http://androdome.com/res/ClientToolbox.php");
//navigateToolbox(GetFileInPath("/content/page/controller.html"));
//navigateToolbox("http://androdome.com/res/ClientToolbox.php");
navigateToolbox(GetFileInPath("/content/page/surface.html"));
//navigateToolbox(GetFileInPath("/content/page/controller.html"));
}

View File

@@ -9,6 +9,8 @@
#include "Globals.h"
#pragma once
#include "ax.h"
#include "Tool/SurfaceTool.h"
#include "Application.h"
HRESULT IEBrowser::doExternal(std::wstring funcName,
DISPID dispIdMember,
@@ -53,6 +55,28 @@ HRESULT IEBrowser::doExternal(std::wstring funcName,
AudioPlayer::playSound(dingSound);
return S_OK;
}
else if(funcName==L"SetSurface")
{
if(pDispParams->cArgs < 2)
return E_NOTIMPL;
int j = pDispParams->rgvarg->intVal;
int i = (pDispParams->rgvarg+1)->intVal;
printf("Got values %d and %d", i, j);
if(i > 5 || i < 0)
return E_NOTIMPL;
g_usableApp->changeTool(new SurfaceTool((Enum::SurfaceType::Value)i, j));
/*VARIANT val1;
VARIANT val2;
unsigned int puArgErr;
HRESULT res = DispGetParam(pDispParams,1,VT_VARIANT,&val1, &puArgErr);
if(res != S_OK)
return res;
//res = DispGetParam(pDispParams,1,VT_UI4,&val2, &puArgErr);
//if(res != S_OK)
//return res;
*/
return S_OK;
}
else if(funcName==L"SetColor")
{

View File

@@ -0,0 +1,38 @@
#include "Tool/SurfaceTool.h"
#include "Application.h"
SurfaceTool::SurfaceTool(Enum::SurfaceType::Value theSurface, int extraParam)
{
surface = theSurface;
param = extraParam;
}
SurfaceTool::~SurfaceTool(void)
{
}
void SurfaceTool::onButton1MouseDown(Mouse mouse)
{
}
void SurfaceTool::onButton1MouseUp(Mouse mouse)
{
}
void SurfaceTool::onMouseMoved(Mouse mouse)
{
}
void SurfaceTool::onSelect(Mouse mouse)
{
}
void SurfaceTool::onKeyDown(int key)
{
}
void SurfaceTool::onKeyUp(int key)
{
}