Gantt class
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: Gantt class
but I cannot publish his work... without his autorization !!!
FWH .. BC582.. xharbour
- carlos vargas
- Posts: 1421
- Joined: Tue Oct 11, 2005 5:01 pm
- Location: Nicaragua
Re: Gantt class
aca arturo indica que retiro la clase por problemas de "distribucion", ya que alguien la estaba vendido como suya por 300.00 euros.
http://www.lawebdelprogramador.com/foro ... Gantt.html
si realizamos una busqueda en el foro por la palabra tgantt, no encontramos recurrentemente que la autoria de la clase se le atribuye a Ramon Avendaño, gran colaborador y desarrollador de clases de gratuitas para fivewin.
asi mismo Arturo nunca da indicios que la clase no sea otra cosa que un desarrollo suyo.
creo que lo mejor es que la comunidad realize el desarrollo de una nueva clase tgantt publica, o que fivetech la desarrolle como parte de su producto, para evitar este tipo de problemas.
salu2
carlos vargas
http://www.lawebdelprogramador.com/foro ... Gantt.html
si realizamos una busqueda en el foro por la palabra tgantt, no encontramos recurrentemente que la autoria de la clase se le atribuye a Ramon Avendaño, gran colaborador y desarrollador de clases de gratuitas para fivewin.
asi mismo Arturo nunca da indicios que la clase no sea otra cosa que un desarrollo suyo.
creo que lo mejor es que la comunidad realize el desarrollo de una nueva clase tgantt publica, o que fivetech la desarrolle como parte de su producto, para evitar este tipo de problemas.
salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
Carlos Vargas
Desde Managua, Nicaragua (CA)
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: Gantt class
Carlos,
Arturo la copió de Ramón.
Arturo la copió de Ramón.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Re: Gantt class
Hi to all, sorry for jumping in, but just could not resist...
From the "lawebdelprogramador.com"
arturo tamayo wrote:
Nota, decidi no publicarlo mas esta clase por ya hay un italiano que la copio y la esta vendiendo creo que en 300 euros
guess who is the italian selling the copy for 300 euros
Regards/Saludos to everybody
Euclides
From the "lawebdelprogramador.com"
arturo tamayo wrote:
Nota, decidi no publicarlo mas esta clase por ya hay un italiano que la copio y la esta vendiendo creo que en 300 euros
guess who is the italian selling the copy for 300 euros
Regards/Saludos to everybody
Euclides
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: Gantt class
I have to make a clarification:
Ramon made a class called TGraph.prg this class no have mousemove actions : it is a static class as you can see on this picture
Arthuro made mousemove actions methods on Tgraph.prg and recall it into Tgantt.prg
I made mouse move actions methods and other features from Tgraph.prg and recal it into Tplan.prg and if I create modification can sal my sources ?
I not decompiled Arthuro class , Arthuro not sad the truth , he copyed the class from Ramon !!!
I can try at any time even before a judge that I never decompiled class because I have original files of Ramon from 1998 and then I had no interest to decompile the class of Arthuro.
On mine sources of Tplan.prg there are these lines :
Ramon made a class called TGraph.prg this class no have mousemove actions : it is a static class as you can see on this picture
Arthuro made mousemove actions methods on Tgraph.prg and recall it into Tgantt.prg
I made mouse move actions methods and other features from Tgraph.prg and recal it into Tplan.prg and if I create modification can sal my sources ?
I not decompiled Arthuro class , Arthuro not sad the truth , he copyed the class from Ramon !!!
I can try at any time even before a judge that I never decompiled class because I have original files of Ramon from 1998 and then I had no interest to decompile the class of Arthuro.
On mine sources of Tplan.prg there are these lines :
Code: Select all
/*-------------------------------------------------------------------------\
| Class: Class Tplan |
| Descripton: Remake of Tgant class |
| Language: xharbour /fw |
| Version: 1.00 version. |
| Date: 22/01/2000 |
| Author: Ramon Avendano, 1998 |
| Adds by: Silvio Falconi |
| Rights: There are some restrictions to the use of this code. |
| Please read the README file that accompanied this code |
| before using it or modifying it. |
| |
| Warranties: None. The code has not been rigorously tested in a formal |
| development environment, and is offered as-is. The author |
| assumes no responsibility for its use, or for any |
| consequences that may arise from its use. |
| |
|
\-------------------------------------------------------------------------*/
Last edited by MdaSolution on Fri Sep 30, 2011 4:53 pm, edited 2 times in total.
FWH .. BC582.. xharbour
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: Gantt class
Mr. Euclides,Euclides wrote:Hi to all, sorry for jumping in, but just could not resist...
From the "lawebdelprogramador.com"
arturo tamayo wrote:
Nota, decidi no publicarlo mas esta clase por ya hay un italiano que la copio y la esta vendiendo creo que en 300 euros
guess who is the italian selling the copy for 300 euros
Regards/Saludos to everybody
Euclides
Sure .... Arthuro cannot pubblish it because he not created it and he cannot pubblish without the autorization on the original author...
FWH .. BC582.. xharbour
Re: Gantt class
There are something that I cannot understand regarding Mr. Arturo Tamayo statement:Hi to all, sorry for jumping in, but just could not resist...
From the "lawebdelprogramador.com"
arturo tamayo wrote:
Nota, decidi no publicarlo mas esta clase por ya hay un italiano que la copio y la esta vendiendo creo que en 300 euros
guess who is the italian selling the copy for 300 euros
Regards/Saludos to everybody
Euclides
"Nota, decidi no publicarlo mas esta clase por ya hay un italiano que la copio y la esta vendiendo creo que en 300 euros"
If Mr. Tamayo is the class' owner and he already decided to publish it, why stop if by doing that he will be helping the other person that is selling his class?
I think Mr. Tamayo should publish his class, if he has the source code, and by doing this, he is contributing to this forum.
George
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: Gantt class
George,
Mr. Tamayo is NOT the class' owner, he copied it from tgraph 's Avendano class, he only made some modifications...
When Avendano sent me his class , he sad no send to anyone, but then on 2001 Arthuro published tgantt class object
it seems Ramon sent to me and to Arthuro his first project ...
George,
if Mr Tamayo is the class' owner he must explain why I have the Ramon Avendano sources
And I Know Arthuro lose his sources on 2006
and ask to me the first project of Ramon but I not sent it to Arthuro ( I have old messages on chat icq where Arthuro ask me the ramon class)
Mr. Tamayo is NOT the class' owner, he copied it from tgraph 's Avendano class, he only made some modifications...
When Avendano sent me his class , he sad no send to anyone, but then on 2001 Arthuro published tgantt class object
it seems Ramon sent to me and to Arthuro his first project ...
George,
if Mr Tamayo is the class' owner he must explain why I have the Ramon Avendano sources
And I Know Arthuro lose his sources on 2006
and ask to me the first project of Ramon but I not sent it to Arthuro ( I have old messages on chat icq where Arthuro ask me the ramon class)
FWH .. BC582.. xharbour
Re: Gantt class
Thanks Mr. MdaSolution for the clarification.
At this moment seems that Ramon Avendano, as we are not hearing from Mr. Tamayo, is the only one that can solve this puzzle.
George
At this moment seems that Ramon Avendano, as we are not hearing from Mr. Tamayo, is the only one that can solve this puzzle.
George
Re: Gantt class
Can we download a working exe to see this class in action.
Best regards,
Otto
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
Re: Gantt class
Hi,
Ramón published his class on the old OZS news server (news.fivetechsoft.com).
Arturo took this class and added Hernan´s Browse.
I think both, Arturo and Silvio, tried to sell the class. But as original Ramon´s autorship was public, both people stopped distributing this class.
Maybe Antonio has a copy of old OZS news.
Ramón published his class on the old OZS news server (news.fivetechsoft.com).
Arturo took this class and added Hernan´s Browse.
I think both, Arturo and Silvio, tried to sell the class. But as original Ramon´s autorship was public, both people stopped distributing this class.
Maybe Antonio has a copy of old OZS news.
Saludos,
Eduardo
Eduardo
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Gantt class
If someone has Ramón Avendaño Class TGant sources, please email them to me as we are going to test it, contact him and ask for authorization.
Does someone know the current email of Ramón ? thanks
Does someone know the current email of Ramón ? thanks
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Gantt class
We already got a written authorization from Ramón to publish his Class TGant source code, and he confirms that he does not longer its source code, so we kindly ask to however may have it to publish it here, thanks
Hola Félix:
Yo no hice realmente una clase Tgantt, solo y hace mucho tiempo extraje de uno de mis programas la parte que generaba una grafica tipo Gantt y la retoque como ejemplo para alguien y se lo mande (no recuerdo a quien) para que hiciese lo que quisiera con ello.
No se sí en algún viejo ordenador puedo tener algo de esto, pero creo que lo que en su momento hice sobre el tema lo he perdido.
He entrado en el enlace del foro que me adjuntas, creo que se ha montado un pequeño lio de algo que hice hace mucho tiempo y que poco valor tenia y si alguien aun tiene algo mío sobre el tema lo puede publicar, aunque ya digo que de poco puede valer.
Para cualquier cosa más escríbeme a avendano@mundo-r.com, al que me has escrito apenas lo utilizo.
Un saludo,
Ramón Avendaño.
Un abrazo,
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Gantt class
Here we have an example of use:
http://code.google.com/p/fivewin-contri ... p&can=2&q=
Now we need its source code, please
http://code.google.com/p/fivewin-contri ... p&can=2&q=
Now we need its source code, please
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Gantt class
Finally Ramón Avendaño Class TGant sources are here and available to everybody
gantt.prg
gantt.ch
This function is required:
We have not testet it yet, so your feedback about it is welcome
gantt.prg
Code: Select all
#include "FiveWin.ch"
#define GWL_STYLE -16
Static nOldCol,nOldRow
Static nOldCol1,nOldCol2,nOldRow2
//----------------------------------------------------------------------------//
CLASS TGantt FROM TControl
DATA nWidth, nHeight
DATA aItems,lCaptured,lCaptuPre
DATA nItem,nItePre
DATA nRow1,nRow2,nCol1,nCol2 AS NUMERIC INIT 0
DATA nRowi1,nRowi2,nColi1,nColi2 AS NUMERIC INIT 0
DATA hTrazoPen
DATA hOldPen
DATA iRop,bLbx
DATA nLCol,nRCol AS LOGICAL INIT .f.
DATA bChange
DATA bPresed
DATA bTrovaTIP,bIniziofine
DATA cToolTip,cTipIniFine
CLASSDATA lRegistered AS LOGICAL
METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, lBorder,;
lVScroll, lHScroll, nClrFore, nClrBack,bchange,dpresed,blbx) CONSTRUCTOR
METHOD Redefine( nId, oWnd, nClrFore, nClrBack ) CONSTRUCTOR
MESSAGE FillRect( aRect, oBrush,barra ) METHOD _FillRect( aRect, oBrush,barra )
METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaint(), 0
METHOD Paint()
METHOD LButtonDown( nRow, nCol, nKeyFlags )
METHOD LButtonUp( nRow, nCol, nKeyFlags )
METHOD MouseMove( nRow, nCol, nKeyFlags )
METHOD LDblClick( nRow, nCol, nKeyFlags )
METHOD Line( nTop, nLeft, nBottom, nRight, oPen )
METHOD Rectang( nTop, nLeft, nBottom, nRight, oPen,Barra )
METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel, ;
lTransparent, nAlign )
METHOD DibRect()
METHOD DibLine()
METHOD End()
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, lBorder,;
lVScroll, lHScroll, nClrFore, nClrBack,bChange,bPresed,blbx ) CLASS TGantt
// DEFAULT nWidth := 100, nHeight := 100,;
DEFAULT lBorder := .T.,;
lVScroll := .f., lHScroll := .f.,;
oWnd := GetWndDefault()
::cCaption = ""
::lCaptured = .f.
::lCaptuPre = .f.
::aitems = {}
::nitem = 0
::nitePre = 0
::nTop = nTop
::nLeft = nLeft
::nBottom = nTop + nHeight - 1
::nRight = nLeft + nWidth - 1
::oWnd = oWnd
::bchange = bChange
::bPresed = bPresed
::bLbx = bLbx
::nStyle = nOr( WS_CHILD,;
If( lBorder, WS_BORDER, 0 ),;
If( lVScroll, WS_VSCROLL, 0 ),;
If( lHScroll, WS_HSCROLL, 0 ),;
WS_VISIBLE, WS_TABSTOP)
::Register() // nOR(CS_VREDRAW,CS_HREDRAW) )
::cToolTip := ''
::cTipIniFine := ''
::SetColor( nClrFore, nClrBack )
::htrazopen:=createpen(PS_SOLID,1,nRGB(128,128,128) )
if oWnd:lVisible
::Create()
::Default()
::lVisible = .t.
oWnd:AddControl( Self )
else
oWnd:DefControl( Self )
::lVisible = .f.
endif
/*
if lVScroll
DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self
endif
if lHScroll
DEFINE SCROLLBAR ::oHScroll HORIZONTAL OF Self
endif
*/
return Self
//----------------------------------------------------------------------------//
METHOD Redefine( nId, oWnd, nClrFore, nClrBack,bChange, bPresed,blbx ) CLASS TGantt
DEFAULT oWnd := GetWndDefault()
::nId = nId
::cCaption = ""
::lCaptured = .f.
::lCaptuPre = .f.
::oWnd = oWnd
::bchange = bChange
::bPresed = bPresed
::bLbx = bLbx
::nWidth = 100
::nHeight = 100
::Register()
::SetColor( nClrFore, nClrBack )
if lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), WS_VSCROLL )
DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self
endif
if lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), WS_HSCROLL )
DEFINE SCROLLBAR ::oHScroll HORIZONTAL OF Self
endif
oWnd:DefControl( Self )
return Self
//----------------------------------------------------------------------------//
METHOD Paint() CLASS TGantt
local oRect := ::GetRect()
if ::bPainted != nil
Eval( ::bPainted, ::hDC )
endif
return 0 //nil
//----------------------------------------------------------------------------//
METHOD Line( nTop, nLeft, nBottom, nRight, oPen ) CLASS TGantt
local hPen := if( oPen = nil, 0, oPen:hPen )
::GetDC()
MoveTo( ::hDC, nLeft, nTop )
LineTo( ::hDC, nRight, nBottom, hPen )
::ReleaseDC()
return nil
//----------------------------------------------------------------------------//
METHOD Rectang( nTop, nLeft, nBottom, nRight, oPen,barra ) CLASS TGantt
local hPen := if( oPen = nil, 0, oPen:hPen )
Local nBar := if( barra = nil, 0, barra)
::GetDC()
Rectangle( ::hDC, nTop, nLeft, nBottom, nRight, hPen )
::ReleaseDC()
/*
if nbar > 0
if len(::aitems) >= nBar
::aitems[nbar]:={ntop,nleft,nBottom,nRight}
else
AADD( ::aitems,{ntop,nleft,nBottom,nRight} )
endif
endif
*/
return nil
//----------------------------------------------------------------------------//
METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel,;
lTransparent, nAlign ) CLASS TGantt
DEFAULT nClrFore := ::nClrText,;
nClrBack := ::nClrPane,;
oFont := ::oFont,;
lPixel := .f.,;
lTransparent := .f.
if ValType( nClrFore ) == "C" // xBase Color string
nClrBack = nClrFore
nClrFore = nGetForeRGB( nClrFore )
nClrBack = nGetBackRGB( nClrBack )
endif
::GetDC()
DEFAULT nAlign := GetTextAlign( ::hDC )
WSay( ::hWnd, ::hDC, nRow, nCol, cValToChar( cText ), nClrFore, nClrBack,;
If( oFont != nil, oFont:hFont, 0 ), lPixel, lTransparent, nAlign )
::ReleaseDC()
return nil
//------------------//
METHOD MouseMove( nRow, nCol, nKeyFlags ) CLASS TGantt
local neoitem,ctext
if ::lCaptured
neoItem:=ASCAN(::aitems,{ |val| val[1] <= nRow .and. ;
val[2] <= ncol .and. ;
val[4] >= ncol .and. ;
val[3] >= nRow })
if neoItem = 0 .and. ( nRow<=::nrow1+2 .or. nRow>=::nrow2-1 ) .and.;
::nlCol .and. ::nRCol
if nCol>nOldCol1 .and. nCol<nOldcol2
CURSOR("CURSOR_1")
::DibRect()
selectObject(::hDC,::hOldPen)
::ReleaseDC()
::lCaptured:=.f.
::lCaptuPre:=.t.
::nRowi1=::nRow2-1
::nColi1=nOldCol2
::nColi2=nCol
::nrowi2=nRow
nOldRow:=::nRow2-1
nOldRow2:=::nRow2-1
nOldCol:=nOldCol2
::nRowi2:=nOldRow2+(nRow-nOldRow)
::nColi2:=nOldCol2+(nCol-nOldCol)
::holdpen:=Selectobject(::hDC,::hTrazoPen)
::DibLine()
ReTurn 0
endif
/*
//----- Disegna TIP
IF ::bInizioFine # nil
IF ::lCAmbiaDay
::DestroyToolTip()
ENDIF
eval(::bInizioFine)
IF ! empty(::cTipIniFine)
cText := substr(::cTipIniFine,1,5) + ' al ' + substr(::cTipIniFine,12,5)
::ShowToolTip( ::nBoxBottom + 3 , ::nBoxLeft ,cText )
ENDIF
ENDIF
*/
endif
::DibRect()
if ::nRCol .and. !::nLCol
CURSOR("CURSOR_2")
if nOldCol2+(nCol-nOldCol) > ::ncol1
::nCol2:=nOldCol2+(nCol-nOldCol)
endif
endif
if ::nlCol .and. !::nRCol
CURSOR("CURSOR_3")
if nOldCol1+(nCol-nOldCol) < ::ncol2
::nCol1:=nOldCol1+(nCol-nOldCol)
endif
endif
if ::nlCol .and. ::nRCol
CURSOR("CURSOR_4")
::nCol1:=nOldCol1+(nCol-nOldCol)
::nCol2:=nOldCol2+(nCol-nOldCol)
endif
::DibRect()
ReTurn 0
endif
if ::lCaptuPre
::DibLine()
::nRowi2:=nOldRow2+(nRow-nOldRow)
::nColi2:=nOldCol2+(nCol-nOldCol)
::DibLine()
::nItePre:=ASCAN(::aitems,{ |val| val[1] <= nRow .and. ;
val[2] <= ncol .and. ;
val[4] >= ncol .and. ;
val[3] >= nRow })
if ::nitepre!=0
Cursor("CURSOR_1")
else
// Super:MouseMove( nRow, nCol, nKeyFlags )
cursorarrow()
endif
ReTurn 0
endif
::nItem:=ASCAN(::aitems,{ |val| val[1] <= nRow .and. ;
val[2] <= ncol .and. ;
val[4]+5 >= ncol .and. ;
val[3] >= nRow })
if ::lcaptured
if ::nItem = 0
CURSOR("CURSOR_1")
::lCaptured:=.f.
::lCaptuPre:=.t.
endif
endif
if ::nItem !=0
if ::aitems[::nitem][2] <= ncol .and. ::aitems[::nitem][2]+2 >=ncol
CURSOR("CURSOR_3")
// Cursorwe()
elseif ::aitems[::nitem][4]-3 <= ncol .and. ::aitems[::nitem][4] >=ncol
CURSOR("CURSOR_2")
// Cursorwe()
elseif ::aitems[::nitem][4]+2 <= ncol .and. ::aitems[::nitem][4]+5 >= ncol
Cursor("CURSOR_1") //cadema
elseif ::aitems[::nitem][2] < ncol+2 .and. ::aitems[::nitem][4]-3 > ncol
CURSOR("CURSOR_4") //mover
else
Cursorarrow()
// Super:MouseMove( nRow, nCol, nKeyFlags )
endif
IF ::bTrovaTip # nil
eval(::bTrovaTip,self)
IF ! empty(::cToolTip)
::ltooltipBallon:=.t.
::ntooltipwidth:=600
::ntooltipTexColor:=RGB(0,0,0) //RGB(255,255,255)
::ntooltipBkColor:=RGB(58,116,241) //ColorPan() //
::ntooltipIcon:=0
::ShowToolTip( nRow, nCol,::cToolTip )
ENDIF
ENDIF
else
If ::bTrovaTip # nil
::DestroyToolTip()
Endif
Cursorarrow()
// Super:MouseMove( nRow, nCol, nKeyFlags )
endif
Return 0
//---------------------------------------------------------//
METHOD LButtonDown( nRow, nCol, nKeyFlags ) CLASS TGantt
if ::bLbx!=NIL
::Blbx:LbuttonDown( nRow+32, 40, nKeyFlags )
endif
::GetDC()
nOldCol:=nCol
nOldRow:=nRow
::nitem:=ASCAN(::aitems,{ |val| val[1] <= nRow .and. ;
val[2] <= ncol .and. ;
val[4]+5 >= ncol .and. ;
val[3] >= nRow })
if ::nitem !=0
::holdpen:=Selectobject(::hDC,::hTrazoPen)
if ::aitems[::nitem][2] <= ncol .and. ::aitems[::nitem][2]+2 >=ncol
::lCaptured:=.t.
::nRow1=::aitems[::nitem][1] -2
::nCol1=::aitems[::nitem][2]
::nCol2=::aitems[::nitem][4]
::nrow2=::aitems[::nitem][3] +1
::nLcol:=.t.
::nRcol:=.f.
nOldCol1:=::nCol1
nOldCol2:=::nCol2
::DibRect()
CURSOR("CURSOR_3")
elseif ::aitems[::nitem][4]-3 <= ncol .and. ::aitems[::nitem][4]>=ncol
::lCaptured:=.t.
::nRow1=::aitems[::nitem][1] -2
::nCol1=::aitems[::nitem][2]
::nCol2=::aitems[::nitem][4]
::nrow2=::aitems[::nitem][3] +1
::nLcol:=.f.
::nRcol:=.t.
nOldCol1:=::nCol1
nOldCol2:=::nCol2
::DibRect()
CURSOR("CURSOR_2")
elseif ::aitems[::nitem][4]+2 <= ncol .and. ::aitems[::nitem][4]+5 > ncol
::lCaptured:=.f.
::lCaptuPre:=.t.
::nRowi1=nRow
::nColi1=nCol
::nColi2=nCol
::nrowi2=nRow
nOldRow2:=nRow
nOldCol2:=nCol
::DibLine()
Cursor("CURSOR_1")
elseif ::aitems[::nitem][2] < ncol+2 .and. ::aitems[::nitem][4]-3 > ncol
::lCaptured:=.t.
::nRow1=::aitems[::nitem][1] -2
::nCol1=::aitems[::nitem][2]
::nCol2=::aitems[::nitem][4]
::nrow2=::aitems[::nitem][3] +1
::nLcol:=.t.
::nRcol:=.t.
nOldCol1:=::nCol1
nOldCol2:=::nCol2
::DibRect()
CURSOR("CURSOR_4")
endif
endif
RETURN Super:LButtonDown( nRow, nCol, nKeyFlags )
//------------------------------------------------------//
METHOD LButtonUp( nRow, nCol, nKeyFlags ) CLASS TGantt
::DestroyToolTip()
if ::lCaptured
::DibRect()
selectObject(::hDC,::hOldPen)
::ReleaseDC()
::lCaptuPre:=.f.
::lCaptured:=.f.
if nOldCol1!=::nCol1 .or. ;
nOldCol2!=::nCol2
if ::bchange != NIL
eval(::bChange,Self)
endif
endif
endif
if ::lCaptuPre
::DibLine()
selectObject(::hDC,::hOldPen)
::ReleaseDC()
::lCaptured:=.f.
::lCaptuPre:=.f.
if ::nitepre !=0 .and. ::nItem != 0
if ::nitepre != ::nItem
if ::bPresed != NIL
eval(::bPresed,Self)
endif
endif
endif
::nItePre:=0
endif
/*
IF ::bInizioFine # nil
::DestroyToolTip()
endif
*/
Return Super:LButtonUp( nRow, nCol, nKeyFlags )
//----------------------------------------------------------------------------//
METHOD DibRect() CLASS TGantt
::iRop:=ClsetroP2(::hDC, 7)
MoveTo( ::hDC, ::nCol1,::nRow1 )
LineTo( ::hDC, ::nCol2,::nRow1 )
LineTo( ::hDC, ::nCol2,::nRow2 )
LineTo( ::hDC, ::nCol1,::nRow2 )
LineTo( ::hDC, ::nCol1,::nRow1 )
ClseTroP2(::hDC,::iRop)
RETURN NIL
//----------------------------//
METHOD DibLine() CLASS TGantt
::iRop:=ClsetroP2(::hDC, 7)
MoveTo( ::hDC, ::nColi1,::nRowi1 )
LineTo( ::hDC, ::nColi2,::nRowi2 )
ClseTroP2(::hDC,::iRop)
RETURN NIL
//-----------------------------//
METHOD End() CLASS TGantt
deleteobject(::hTrazoPen)
Super:End()
RETURN NIL
//--------------------------------------//
METHOD LDblClick( nRow, nCol, nKeyFlags )
::lCaptured:=.f.
::lCaptuPre:=.f.
if ::bLbx!=NIL
::blbx:LDblClick( nRow, nCol, nKeyFlags )
endif
Super:LDblClick( nRow, nCol, nKeyFlags )
Return NIL
//-----------------------------------------------------//
METHOD _FillRect (aCols, oBrush,barra) CLASS TGantt
Local nBar := if( barra = nil, 0, barra)
::GetDC()
FillRect(::hDC ,aCols, oBrush:hBrush)
::ReleaseDC()
if nbar > 0
if len(::aitems) >= nBar
::aitems[nbar]:={aCols[1],aCols[2],aCols[3],aCols[4]}
else
AADD( ::aitems,{aCols[1],aCols[2],aCols[3],aCols[4]} )
endif
endif
return NIL
Code: Select all
//----------------------------------------------------------------------------//
// GANTT
#xcommand @ <nRow>, <nCol> GANTT [<oGantt>] ;
[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ <border: BORDER>] ;
[ <vScroll: VSCROLL, VERTICAL SCROLL> ] ;
[ <hScroll: HSCROLL, HORIZONTAL SCROLL> ] ;
[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
[ ON CHANGE <uChange> ] ;
[ ON PRESED <uPresed> ] ;
[ BOXLIS <uLbx> ] ;
=> ;
[<oGantt> := ] TGantt():New( <nRow>, <nCol>, <nWidth>, <nHeight>, <oWnd>,;
<.border.>, [<.vScroll.>], [<.hScroll.>], <nClrFore>,;
<nClrBack>,[<{uChange}>],[<{uPresed}>],<uLbx> )
#xcommand REDEFINE GANTT [<oGantt>] ;
[ ID <nId> ] ;
[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
=> ;
[ <oGantt> := ] TGantt():Redefine( <nId>, <oWnd>,;
<nClrFore>, <nClrBack> )
Code: Select all
#include <windows.h>
#include <hbapi.h>
HB_FUNC( CLSETROP2 ) // ( hDll, Ctex )
{
hb_retni( SetROP2( ( HDC ) hb_parnl( 1 ), hb_parni( 2 ) ) );
}