Jump to content

Dave Briccetti's Programming Samples: Difference between revisions

From EDM2
Ak120 (talk | contribs)
m fixing the links and wrong claims, pasted source file useless without rc from h
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
By [[Dave Briccetti]]
''By [[Dave Briccetti]]''


==Air Traffic Control Container==
==Air Traffic Control Container==
'''Last Update:''' 1995
'''Last Update:''' 1995
This program and Freelance presentation teaches old-style (before Open Class) container and drag/drop programming, using a simple Air Traffic Control example.
This program and Freelance presentation teaches old-style (before Open Class) container and drag/drop programming, using a simple Air Traffic Control example.


* Freelance presentation (35,548 bytes)
[[Image:DB-Samples-atccnr.jpg]]
* Zip file with source code (21,938 bytes)
 
*[https://web.archive.org/web/19970122165609if_/http://www.davebsoft.com:80/Programming/tips/atccnr/AtcCnrPres.zip Freelance presentation] (35,548 bytes)
*[https://web.archive.org/web/19970122165627if_/http://www.davebsoft.com:80/Programming/tips/atccnr/atccnr3.zip Zip file with source code] (21,938 bytes)


==Slip Canvas==
==Slip Canvas==
'''Last Update:''' 30-Dec-1996
'''Last Update:''' 30-Dec-1996
This program and Freelance presentation demonstrates how to use ISplitCanvas Open Class objects.
This program and Freelance presentation demonstrates how to use ISplitCanvas Open Class objects.


The program uses an IFrame window for the main application window. In that IFrame window it places a split canvas with a vertical split. In the left side of that canvas it places another split canvas, this time one with a horizontal split. It shows parts of the program source code in the top left and bottom left panes, and a bitmap in the right pane.
The program uses an IFrame window for the main application window. In that IFrame window it places a split canvas with a vertical split. In the left side of that canvas it places another split canvas, this time one with a horizontal split. It shows parts of the program source code in the top left and bottom left panes, and a bitmap in the right pane.


* Zip file with source code and Freelance presentation (10,932 bytes) '''(NOTE: This file was missing from Web-Archive)'''
[[Image:DB-Samples-SplitCanvas.gif]]


====Main source code file spltsamp.cpp====
*[https://web.archive.org/web/19970122165648if_/http://www.davebsoft.com:80/Programming/tips/SplitCanvas/SplitCanvas.zip Zip file with source code and Freelance presentation] (10,932 bytes)
/* Split Canvas sample program - Dave Briccetti (daveb@davebsoft.com), Dec. 1994
  +-------+-----+
  | MLE  | Bit |  This program shows two MLE-type windows on the top and
  |      | map |  bottom parts of the left side of the window, and a
  +-------+    |  bitmap on the right side.  It uses two split canvases:
  | MLE  |    |  one split vertically, and a smaller one split horizontally.
  +-------+-----+
*/
#include &ltiframe.hpp>                      // Frame
#include &ltisplitcv.hpp>                    // Split canvas
#include &ltimle.hpp>                        // Multi-line Edit
#include &ltibmpctl.hpp>                      // Bitmap
#include &ltifont.hpp>                        // Fonts
#include "ids.h"                            // Resources and window ids
class SourceDisplayMle : public IMultiLineEdit
{
    public:
        SourceDisplayMle (unsigned long id, IWindow* parent,
            IWindow* owner, char * pszFile);
};
 
void main()
{
    IFrameWindow frame                      // Create frame window
        ("Programming Tip -- Split Canvas");
    ISplitCanvas canvasFull                // Create full canvas (frame child)
        (ID_CANVASFULL, &frame, &frame);
    ISplitCanvas canvasLeft                // Create left side canvas
        (ID_CANVASLEFT, &canvasFull, &canvasFull);
    canvasLeft.setOrientation              // Make it split horizontally
        (ISplitCanvas::horizontalSplit);
    frame.setClient (&canvasFull);          // Make full canvas client of frame
    SourceDisplayMle mleSourceCode          // Create source display control
        (ID_MLESOURCECODE, &canvasLeft,    //  for C++ program
        &canvasLeft, "spltsamp.cpp");
    SourceDisplayMle mleResourceFile        // Create source display control
        (ID_MLERESOURCEFILE, &canvasLeft,  //  for resource file
        &canvasLeft, "spltsamp.rc");
    IBitmapControl bmpBookCover            // Create a bitmap control
        (ID_BITMAPCONTROL, &canvasFull,    //  with a resource bitmap
        &canvasFull, ID_BITMAPRESOURCE);
    canvasFull.setSplitWindowPercentage    // Allocate full canvas space
        (&canvasLeft, 55);                  //  for left canvas
    canvasFull.setSplitWindowPercentage    // Allocate full canvas space
        (&bmpBookCover, 45);                //  for bitmap
    canvasLeft.setSplitWindowPercentage    // Allocate left side canvas space
        (&mleSourceCode, 85);              //  for source code display
    canvasLeft.setSplitWindowPercentage    // Allocate canvas space
        (&mleResourceFile, 15);            //  for resource file display
    frame.setFocus ();                      // Set focus to the frame window
    frame.show ();                          // Show the frame
    IApplication::current().run();          // Run the application
}
SourceDisplayMle :: SourceDisplayMle        // Custom MLE window constructor
    (unsigned long id, IWindow* parent, IWindow* owner, char * pszFile) :
    IMultiLineEdit(id, parent, owner)      // Call IMle constructor
{
    disableDataUpdate ();                  // Make it read only
    disableWordWrap ();                    // Turn off word wrap
    IFont fontMono ("Courier", 8);          // Create a monospaced font
    setFont (fontMono);                    // Set monospaced font
    importFromFile (pszFile);              // Load source code into MLE
    setTop (0);                            // Set first line at top
}


==Sprite Animator==
==Sprite Animator==
'''Last Update:''' 30-Dec-1996
'''Last Update:''' 30-Dec-1996
This program uses sprite animation and DIVE to animate sprites. It is constructed of parts, connected with the Visual Builder of IBM VisualAge C++.
 
This program uses sprite animation and DIVE to animate sprites. It is constructed of parts, connected with the ''Visual Builder'' of IBM VisualAge C++.
 
There is very little documentation at this point. The art was created by Steven Jones and other students.
There is very little documentation at this point. The art was created by Steven Jones and other students.


* SpriteDemo.zip, 217,175 bytes
[[File:DB-Samples-SpriteDemo.gif]]
 
* [https://web.archive.org/web/19970122165817if_/http://www.davebsoft.com:80/Programming/tips/Ship/SpriteDemo.zip SpriteDemo.zip], 217,175 bytes


==DIVE DEMO 2 - Simple Animation==
==DIVE DEMO 2 - Simple Animation==
Line 109: Line 40:
DBDiveParts includes a part which wraps the high-resolution timer, timer0.sys, which provides to-the-millisecond precision for animation.
DBDiveParts includes a part which wraps the high-resolution timer, timer0.sys, which provides to-the-millisecond precision for animation.


There is no documentation at this point. All the C++ code is generated by Visual Builder except files with extensions cppcst and hppcst. You will need HPFS, as well as the VisualAge C++ runtime DLL's. If you don't have the December 1996 CSD's applied, you will need to rebuild the demo.
There is no documentation at this point. All the C++ code is generated by Visual Builder except files with extensions cppcst and hppcst. You will need HPFS, as well as the VisualAge C++ runtime DLLs. If you don't have the December 1996 CSD's applied, you will need to rebuild the demo.


* dbdivedemo2.zip, 176,579 bytes
[[File:DB-Samples-screen.gif]]


* [https://web.archive.org/web/19970122165857if_/http://www.davebsoft.com:80/Programming/tips/DiveDemo2/dbdivedemo2.zip dbdivedemo2.zip], 176,579 bytes


[[Category:Languages Articles]]
[[Category:UICL]]

Latest revision as of 16:13, 2 December 2018

By Dave Briccetti

Air Traffic Control Container

Last Update: 1995

This program and Freelance presentation teaches old-style (before Open Class) container and drag/drop programming, using a simple Air Traffic Control example.

Slip Canvas

Last Update: 30-Dec-1996

This program and Freelance presentation demonstrates how to use ISplitCanvas Open Class objects.

The program uses an IFrame window for the main application window. In that IFrame window it places a split canvas with a vertical split. In the left side of that canvas it places another split canvas, this time one with a horizontal split. It shows parts of the program source code in the top left and bottom left panes, and a bitmap in the right pane.

Sprite Animator

Last Update: 30-Dec-1996

This program uses sprite animation and DIVE to animate sprites. It is constructed of parts, connected with the Visual Builder of IBM VisualAge C++.

There is very little documentation at this point. The art was created by Steven Jones and other students.

DIVE DEMO 2 - Simple Animation

Last Update: 16-Jan-1996

This program contains an early version of "DBDiveParts," a set of Visual Builder parts which simplify high-speed animation. It comes with two sample renderer classes, which generate the frames of animation to be displayed.

DBDiveParts includes a part which wraps the high-resolution timer, timer0.sys, which provides to-the-millisecond precision for animation.

There is no documentation at this point. All the C++ code is generated by Visual Builder except files with extensions cppcst and hppcst. You will need HPFS, as well as the VisualAge C++ runtime DLLs. If you don't have the December 1996 CSD's applied, you will need to rebuild the demo.