home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 March
/
VPR9703A.ISO
/
VPR_DATA
/
DOGA
/
SOURCES
/
WIREVIEW.LZH
/
TIMEBAR.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1995-12-15
|
2KB
|
87 lines
/* Project medit
Project Team DoGA
Copyright (c) 1995. All Rights Reserved.
サブシステム: medit.apx Application
ファイル: timebar.cpp
作成者: Taka2
概要
====
TTimeBar (TScrollBar) のインプリメンテーション用のソースファイル
*/
#include <owl\owlpch.h>
#pragma hdrstop
#include "timebar.h"
#include "anim.h"
#include "motion.h"
//{{TTimeBar Implementation}}
TTimeBar::TTimeBar (TWindow* parent, AnimationData *a, int id, int x, int y, int w, int h, BOOL /*isHScrollBar*/, TModule* /*module*/):
THSlider(parent, id, x, y, w, h)
{
// TScrollBar 用の,デフォルトのウィンドウスタイルをオーバーライドする
// Attr.Style |= WS_CHILD | WS_VISIBLE;
// Attr.Style &= ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX);
// INSERT>> コンストラクタ用のコードはここに
PageMagnitude = 5;
LineMagnitude = 1;
SetRuler(5, FALSE);
anim = a;
}
TTimeBar::~TTimeBar ()
{
Destroy();
// INSERT>> デストラクタ用のコードはここに
}
void TTimeBar::SBPageDown ()
{
// TScrollBar::SBPageDown();
// INSERT>> 追加のコードはここに
if (anim->select == NULL) {
TScrollBar::SBPageDown();
} else if (anim->selectframe >= anim->select->endframe) {
SetPosition(anim->maxframe);
} else if (anim->selectframe < anim->select->beginframe) {
SetPosition(anim->select->beginframe);
} else {
SetPosition(anim->select->endframe);
}
}
void TTimeBar::SBPageUp ()
{
// TScrollBar::SBPageUp();
// INSERT>> 追加のコードはここに
if (anim->select == NULL) {
TScrollBar::SBPageUp();
} else if (anim->selectframe <= anim->select->beginframe) {
SetPosition(BEGIN);
} else if (anim->selectframe > anim->select->endframe) {
SetPosition(anim->select->endframe);
} else {
SetPosition(anim->select->beginframe);
}
}