home *** CD-ROM | disk | FTP | other *** search
- /* =============
- * PedViewSub.cc
- * =============
- */
-
- #include "PedestalDebugging.h"
-
- #include <Windows.h>
-
- #include "PedViewSub.hh"
- #include "PedPaneSubView.hh"
-
- PedViewSub::PedViewSub(PedPaneSubView &inSuperPane)
- : mSuperPane(inSuperPane)
- {
- mOrigin.h = mOrigin.v = 0;
- mSuperPane.GetBounds(mFrame);
- }
-
- PedViewSub::~PedViewSub()
- {
- }
-
- PedPaneSubView &
- PedViewSub::SuperPane()
- {
- return mSuperPane;
- }
-
- void
- PedViewSub::GetFrame(Rect &outFrame)
- {
- Rect bounds;
-
- mSuperPane.GetBounds(bounds);
- ::SetRect(&outFrame,
- 0, 0, bounds.right - bounds.left, bounds.bottom - bounds.top);
- }
-
- void
- PedViewSub::GetOrigin(Point &outOrigin)
- {
- outOrigin = mOrigin;
- }
-
- void
- PedViewSub::SetOrigin(Point inOrigin)
- {
- mOrigin = inOrigin;
- }
-
- PedWindow &
- PedViewSub::Window()
- {
- return SuperPane().SuperView().Window();
- }
-
- void
- PedViewSub::GetWindowToFrameOffset(Point &outOffset)
- {
- SuperPane().SuperView().GetWindowToLocalOffset(outOffset);
-
- Rect bounds;
- SuperPane().GetBounds(bounds);
- //::AddPt(bounds.topLeft, &outOffset);
- outOffset.h += bounds.left;
- outOffset.v += bounds.top;
- }
-
- void
- PedViewSub::Focus()
- {
- SuperPane().SuperView().Focus();
- }
-
- void
- PedViewSub::Open()
- {
- }
-
- void
- PedViewSub::Close()
- {
- }
-
- void
- PedViewSub::Activate()
- {
- }
-
- void
- PedViewSub::Deactivate()
- {
- }
-
- void
- PedViewSub::Refresh()
- {
- Rect invalid;
- Point offset;
-
- GetFrame(invalid);
- GetWindowToFrameOffset(offset);
- ::OffsetRect(&invalid, offset.h, offset.v);
- ::InvalRect(&invalid);
- }
-
- void
- PedViewSub::Resize(short inWidth, short inHeight)
- {
- PedView::Resize(inWidth, inHeight);
- mFrame.right = mFrame.left + inWidth;
- mFrame.bottom = mFrame.top + inHeight;
- }
-
-
- void
- PedViewSub::DispatchNullEvent(EventRecord &inEvent)
- {
-
- }
-
- void
- PedViewSub::DispatchClickEvent(EventRecord &inEvent)
- {
- }
-
- void
- PedViewSub::DispatchKey(EventRecord &inEvent)
- {
- }
-