|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - dedit suggestion / patch
well, sorry for the very naive suggestion (I'm both new to D & dedit)
I have a patch not perfect but good enough for dedit:
// === in view.d
void loadFile (char [] filename)
{
// main code
// I add this
global.root.addDocument(document);
doclist.paint ();
}
//=====
recompile, oups dmd 0.50 has a lot of surprise...
and it worked !
I open new file and they display on the left...
I could use them now, on.....
Also, how to close a project or start a new one ?
Nov 22 2002
I tried hard to use tab ('\t') in dedit.
absolutly necessary to write any makefile....
if I make the followind modification it nearly work correctly
// === main_comands.d ==
void Indent (View view)
{
with (view.document)
{
char [] l = lines [line];
char [] i;
//i.length = (offset + view.indentsize) / view.indentsize *
view.indentsize - offset;
//i [0 .. i.length] = " ";
i = "\t"; // use '\t', no, no space
setLine (line, l [0 .. offset] ~ i ~ l [offset .. l.length]);
offset += i.length;
view.caretChange ();
}
}
// === digcanvas.d ===
void text (int x, int y, char [] string)
{
RECT rect;
rect.left = x;
rect.top = y;
rect.right = x + 64000;
rect.bottom = y + 640;
// TabbedTextOutA() instead of DrawTextA
TabbedTextOutA(hdc, x, y, string, string.length, 0, null, 0);
}
// ===============
of course I add to i need to import these functions:
//===========
extern (Windows)
{
export LONG TabbedTextOutA(HDC,int,int,LPCSTR,int,int,LPINT,int);
export LONG TabbedTextOutW(HDC,int,int,LPCWSTR,int,int,LPINT,int);
}
//===========
the (mysterious) problem is, the cursor is half a character mispositioned by
tab in lines where there is a tab, obviously due to baseX (baseX=0 solve
the problem), but I don't see how...
Nov 22 2002
Lloyd Dupont wrote: Nov 27 2002
|