www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - DWT OLE, embedding VIM

reply Bjoern <nanali nospam-wanadoo.fr> writes:
I want to embed VIM using OLE, No success at all :(, I also tried 
"Shell.Explorer" 'cause VIM is known as problematic, same result.
Maybe I miss some imports, Dunno, Hope someone is able to help;
Kind regards, Bjoern
oh, linking is done with subsystem:console:5, like helloworld stuff  ...

module dwtexamples.helloworld.hellovim;

import dwt.DWT;
import dwt.layout.FillLayout;
import dwt.widgets.Display;
import dwt.widgets.Shell;
import dwt.ole.win32.OLE;
import dwt.ole.win32.OleAutomation;
import dwt.ole.win32.OleControlSite;
//import dwt.ole.win32.OleClientSite;
import dwt.ole.win32.OleFrame;
import dwt.ole.win32.Variant;

/*
  * This example builds on HelloVim and demonstrates how to use OLE
  */
void main ()
{
     Display display = new Display ();
     Shell shell = new Shell (display);
     shell.setSize(600, 400);
     shell.setLayout(new FillLayout());

     OleControlSite oleControlSite;

     OleFrame oleFrame = new OleFrame(shell, DWT.NONE);
     oleControlSite = new OleControlSite(oleFrame, DWT.NONE, 
"Vim.Application"); // "Shell.Explorer"
     oleControlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);

     shell.pack();
     shell.open();
     while (!shell.isDisposed ())
     {
         if (!display.readAndDispatch ()) display.sleep ();
     }
     display.dispose ();
}


// for unknown reason, there are linker errors. These imports are the 
workaround
import tango.io.Stdout;
import tango.math.Math;
import tango.text.convert.Format;
import tango.util.Convert;
import tango.util.PathUtil;
Feb 19 2008
parent reply Frank Benoit <keinfarbton googlemail.com> writes:
Bjoern schrieb:
 I want to embed VIM using OLE, No success at all :(, I also tried 
 "Shell.Explorer" 'cause VIM is known as problematic, same result.
 Maybe I miss some imports, Dunno, Hope someone is able to help;
 Kind regards, Bjoern
 oh, linking is done with subsystem:console:5, like helloworld stuff  ...

I would not expect it to run without problems. Unfortunately its not highest prio right now. First i want to get the basic widgets to work properly. But if you want to give it a try in debugging, that would be apprechiated. If you need assistance, please contact me in #dwt.
Feb 19 2008
parent Bjoern <nanali nospam-wanadoo.fr> writes:
Frank Benoit schrieb:
 Bjoern schrieb:
 I want to embed VIM using OLE, No success at all :(, I also tried 
 "Shell.Explorer" 'cause VIM is known as problematic, same result.
 Maybe I miss some imports, Dunno, Hope someone is able to help;
 Kind regards, Bjoern
 oh, linking is done with subsystem:console:5, like helloworld stuff  ...

I would not expect it to run without problems. Unfortunately its not highest prio right now. First i want to get the basic widgets to work properly. But if you want to give it a try in debugging, that would be apprechiated. If you need assistance, please contact me in #dwt.

Okay, at least we know now that dwt.ole needs some attention :) I am not able to do the debugging job due to lack of OLE know-how. Sorry. During the week I have to do bread and butter programming. Next weekend wrapping Scintilla is on my todo list. Most probabely I need some help regarding Event-Handling. (nessesary imports) Bjoern
Feb 20 2008