Lines Matching refs:frame
89 make_sure_frame_is_on_screen(BRect& frame, BWindow* window)
95 if (frame.IsValid() && screen->IsValid()) {
97 if (!screenFrame.Contains(frame)) {
98 // make sure frame fits in the screen
99 if (frame.Width() > screenFrame.Width())
100 frame.right -= frame.Width() - screenFrame.Width() + 10.0;
101 if (frame.Height() > screenFrame.Height())
102 frame.bottom -= frame.Height() - screenFrame.Height() + 30.0;
103 // frame is now at the most the size of the screen
104 if (frame.right > screenFrame.right)
105 frame.OffsetBy(-(frame.right - screenFrame.right), 0.0);
106 if (frame.bottom > screenFrame.bottom)
107 frame.OffsetBy(0.0, -(frame.bottom - screenFrame.bottom));
108 if (frame.left < screenFrame.left)
109 frame.OffsetBy((screenFrame.left - frame.left), 0.0);
110 if (frame.top < screenFrame.top)
111 frame.OffsetBy(0.0, (screenFrame.top - frame.top));