Page 1 of 1

Expand your desktop application Purebasic in 5 minutes

Posted: Sat Jun 21, 2014 4:17 pm
by microdevweb
I normally developped with windev, but I'm not passionate PureBasic I find really excellent. I start developing an application for automatic generation PB files. Watch the video to see what this application will

I do not put soft online, because there are still too many bugs. But all good sugestion is to take.

The new video 2014/07/16 with a new orientation for simply development
http://youtu.be/ucyxzKID5QE

What time a beta version, 3 of 4 weeks i think

Re: Expand your desktop application Purebasic in 5 minutes

Posted: Sun Jun 22, 2014 1:00 pm
by IdeasVacuum
Looks very interesting 8)

Re: Expand your desktop application Purebasic in 5 minutes

Posted: Sun Jun 22, 2014 10:15 pm
by microdevweb
Tahanks IdeasVacuum.... :P

Re: Expand your desktop application Purebasic in 5 minutes

Posted: Mon Jun 23, 2014 8:16 am
by Rings
topic moved....

Re: Expand your desktop application Purebasic in 5 minutes

Posted: Mon Jun 23, 2014 10:34 am
by Num3
I like it!
Keep up the good work.

Re: Expand your desktop application Purebasic in 5 minutes

Posted: Tue Jun 24, 2014 1:59 am
by byo
Looks great!
One question comes to mind: can you share if you use a CanvasGadget as the modelling area?
I am trying to build a database modeller but not sure what's the best technique.

Keep up the good work on your project. :wink:

Re: Expand your desktop application Purebasic in 5 minutes

Posted: Tue Jun 24, 2014 7:59 am
by microdevweb
Thanks byo,

Yes i use the Canvas for draw a moleling area.

Look the code for the draw

Code: Select all

Procedure  FEN_MAIN_Draw()
      Protected W,H,TG,N,I,Nb_X,Nb_Y,X,Y,W_Txt,Txt$
      W=GadgetWidth(#MAIN_CANVAS)
      H=GadgetHeight(#MAIN_CANVAS)
      TG=Val(GetGadgetText(#MAIN_SPIN))
      Nb_X=Round(W/TG,#PB_Round_Nearest)
      Nb_Y=Round(H/TG,#PB_Round_Nearest)
      GereLink()
      StartDrawing(CanvasOutput(#MAIN_CANVAS))
      Box(0,0,W,H,gColorCanvas)
      If GetGadgetState(#MAIN_BT_GRILLE)=1
            For N=1 To Nb_X
                  For I=1 To Nb_Y
                        X=TG*N
                        Y=TG*I
                        If X<W And Y<H
                              Plot(X,Y,gColorGrille)
                        EndIf
                  Next
            Next
      EndIf
      DrawingFont(FontID(#Font_File))
      ForEach monAnalyse\mesFichiers()
            X=monAnalyse\mesFichiers()\X
            Y=monAnalyse\mesFichiers()\Y
            W=monAnalyse\mesFichiers()\W
            H=monAnalyse\mesFichiers()\H
            Box(X-2,Y-2,W+4,H+4,$000000)
            H=gHeightEntete
            Box(X,Y,W,H,monAnalyse\mesFichiers()\CoulEntete)
            Y+gHeightEntete
            H=monAnalyse\mesFichiers()\H-gHeightEntete
            Box(X,Y,W,H,monAnalyse\mesFichiers()\Coul)
            Y=monAnalyse\mesFichiers()\Y+10
            Txt$=monAnalyse\mesFichiers()\Nom$
            W_Txt=TextWidth(Txt$)
            ;Reduction du titre si plus grand
            While W_Txt>W
                  Txt$=Left( monAnalyse\mesFichiers()\Nom$,Len(Txt$)-4)+"..."
                  W_Txt=TextWidth(Txt$)
           Wend  
           X+(W/2)-(W_Txt/2)
           DrawText(X,Y,Txt$,monAnalyse\mesFichiers()\CoulTxtEntete,monAnalyse\mesFichiers()\CoulEntete)
           ;Impression des rubriques
           X=monAnalyse\mesFichiers()\X
           Y=monAnalyse\mesFichiers()\Y
           X+5
           Y+gHeightEntete
           Y+10
           DrawingMode(#PB_2DDrawing_Transparent)
           SortStructuredList(monAnalyse\mesFichiers()\myRubrique(),#PB_Sort_Ascending,OffsetOf(Rubrique\Order),TypeOf(Rubrique\Order))
           ForEach monAnalyse\mesFichiers()\myRubrique()
                 Txt$=monAnalyse\mesFichiers()\myRubrique()\Name$
                 W_Txt=TextWidth(Txt$)
                  ;Reduction du titre si plus grand
                  While W_Txt>W
                        Txt$=Left( monAnalyse\mesFichiers()\myRubrique()\Name$,Len(Txt$)-4)+"..."
                        W_Txt=TextWidth(Txt$)
                  Wend  
                  If monAnalyse\mesFichiers()\myRubrique()\Type=#TP_PRIMARY_KEY
                        DrawingFont(FontID(#ARIAL_14_BOLD))
                  Else
                        DrawingFont(FontID(#ARIAL_14))
                  EndIf
                  If Y+TextHeight("TESTE")<monAnalyse\mesFichiers()\Y+monAnalyse\mesFichiers()\H
                        DrawText(X,Y,Txt$,$000000)
                  Else
                        Break
                  EndIf
                  Y+TextHeight(Txt$)
           Next
           If monAnalyse\mesFichiers()\Selected=#True
                 DrawPoignee()
           EndIf
     Next
     DrawLink()
      StopDrawing()
EndProcedure

Code: Select all

Procedure DrawLink()
      Protected X2,Y2,X1,Y1,Txt$,Txt2$
      ForEach monAnalyse\mesLink()
            X1=0
            ForEach monAnalyse\mesLink()\myPunt()
                  If X1<>0 
                        X2= monAnalyse\mesLink()\myPunt()\X
                        Y2=monAnalyse\mesLink()\myPunt()\Y
                        LineXY(X1,Y1,X2,Y2,$000000)
                        X1=0
                        Y1=0
                        X2=0
                        Y2=0
                  EndIf
                  If X1=0 
                        X1= monAnalyse\mesLink()\myPunt()\X
                        Y1=monAnalyse\mesLink()\myPunt()\Y
                  EndIf
            Next
      Next
EndProcedure

Code: Select all

Procedure DrawPoignee()
      Protected X,Y
      DrawingMode(#PB_2DDrawing_Default)
      ;Poignée HG
      X=monAnalyse\mesFichiers()\X-(gTaillePoignees/2)
      Y=monAnalyse\mesFichiers()\Y-(gTaillePoignees/2)
      HG\X=X
      HG\Y=Y
      Box(X,Y,gTaillePoignees,gTaillePoignees,gCouleurPoignees)
      ;Poignee HD
      X+monAnalyse\mesFichiers()\W
      HD\X=X
      HD\Y=Y
     Box(X,Y,gTaillePoignees,gTaillePoignees,gCouleurPoignees)
      ;Poignee BG
      X=monAnalyse\mesFichiers()\X-(gTaillePoignees/2)
      Y=monAnalyse\mesFichiers()\Y-(gTaillePoignees/2)
      Y+monAnalyse\mesFichiers()\H
      BG\X=X
      BG\Y=Y
      Box(X,Y,gTaillePoignees,gTaillePoignees,gCouleurPoignees)
      ;Poignee BD
      X+monAnalyse\mesFichiers()\W
      BD\X=X
      BD\Y=Y
      Box(X,Y,gTaillePoignees,gTaillePoignees,gCouleurPoignees)
      ;Poignee MG
      X=monAnalyse\mesFichiers()\X-(gTaillePoignees/2)
      Y=monAnalyse\mesFichiers()\Y-(gTaillePoignees/2)
      Y+(monAnalyse\mesFichiers()\H/2)
      MG\X=X
      MG\Y=Y
      Box(X,Y,gTaillePoignees,gTaillePoignees,gCouleurPoignees)
      ;Poignee MD
      X+monAnalyse\mesFichiers()\W
      MD\X=X
      MD\Y=Y
      Box(X,Y,gTaillePoignees,gTaillePoignees,gCouleurPoignees)
      ;Poignee HM
      X=monAnalyse\mesFichiers()\X-(gTaillePoignees/2)
      Y=monAnalyse\mesFichiers()\Y-(gTaillePoignees/2)
      X+(monAnalyse\mesFichiers()\W/2)
      HM\X=X
      HM\Y=Y
      Box(X,Y,gTaillePoignees,gTaillePoignees,gCouleurPoignees)
      ;Poignee BM
      Y+monAnalyse\mesFichiers()\H
      BM\X=X
      BM\Y=Y
      Box(X,Y,gTaillePoignees,gTaillePoignees,gCouleurPoignees)
EndProcedure

Re: Expand your desktop application Purebasic in 5 minutes

Posted: Wed Jun 25, 2014 5:40 pm
by byo
That's awesome. Thanks for sharing.
I will study the code closely.

Your app runs smoothly from what I can see in the video. Congrats.

Re: Expand your desktop application Purebasic in 5 minutes

Posted: Wed Jul 16, 2014 11:33 am
by microdevweb
New vieo with the new orientation of project

http://youtu.be/ucyxzKID5QE

Re: Expand your desktop application Purebasic in 5 minutes

Posted: Tue Jan 27, 2015 11:51 pm
by le_magn
microdevweb wrote:New vieo with the new orientation of project

http://youtu.be/ucyxzKID5QE
Any news? Project is dead? is possible to download latest beta version?
Thank you