CTimeLineEditor


This article was contributed by : Jeffrey M. Barber

 

Environment: VC6

A time-line editor based on the ZTimeLine data structure, included, designed primarily for animation and scheduling items to be executed. Using STL vectors, ZTimeLine has a series of ZTimeSpan objects. A ZTimeSpan consists of three items:
  • an owner,
  • an action,
  • and a series of ZTimeSlice objects.

A ZTimeSlice object consists of:

  • a starting time,
  • a duration,
  • and a double named weight.

The application using a ZTimeLine will need to define the meaning of weight. For instance, weight could be an angle for a rotation action, it could be a switch for on and off, or it could be an index number known by the application. The ZTimeLine data structure itself has no concept of units, so it can be implemented with ease. However, the ZTimeLine is meant for primarily editing; it would be better to have a compiled vector data-structure for actually executing it.

Using the Demo:

    To create a new slice: double click in a span
    To move a slice: click in the middle of the slice and drag it
    To resize a slice: click on one of the handles and drag it

Downloads

Download source - 103 Kb

© Copyright 2001 - Jeffrey M. Barber



Comments

  • ztimeline.lib is not in Zip file..

    Posted by Legacy on 12/11/2003 12:00am

    Originally posted by: bab


    ztimeline.lib is not in Zip file..

    Reply
  • Why only CView derived class ?

    Posted by Legacy on 10/10/2001 12:00am

    Originally posted by: Martin Bohring

    Hello,
    
    first I would like to thank you for that peace of work,
    but I have a question.

    Why have you derived your time line editor from CView ?

    It would be of more general ussage if it had been derived from CWnd. So it could have been used in dialogs also.

    I see some applications of your code in several of
    my applications (The timelines are edited in tables
    at the moment), but I have to use them on property pages.

    Any ideas how to convert ?

    Reply
  • Some really cool code

    Posted by Legacy on 10/08/2001 12:00am

    Originally posted by: Jerry Walsh

    a true work of art. Thanks

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Java developers know that testing code changes can be a huge pain, and waiting for an application to redeploy after a code fix can take an eternity. Wouldn't it be great if you could see your code changes immediately, fine-tune, debug, explore and deploy code without waiting for ages? In this white paper, find out how that's possible with a Java plugin that drastically changes the way you develop, test and run Java applications. Discover the advantages of this plugin, and the changes you can expect to see …

  • Hybrid cloud platforms need to think in terms of sweet spots when it comes to application platform interface (API) integration. Cloud Velocity has taken a unique approach to tight integration with the API sweet spot; enough to support the agility of physical and virtual apps, including multi-tier environments and databases, while reducing capital and operating costs. Read this case study to learn how a global-level Fortune 1000 company was able to deploy an entire 6+ TB Oracle eCommerce stack in Amazon Web …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds