[Igarden-commit] CommonSource/YAAFExtensions RGPaletteView.cpp, 1.3.2.2, 1.3.2.3
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-12-26 01:37:56
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv20076 Modified Files: Tag: Release_branch_v1 RGPaletteView.cpp Log Message: Improved palette backdrop Index: RGPaletteView.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGPaletteView.cpp,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -C2 -d -r1.3.2.2 -r1.3.2.3 *** RGPaletteView.cpp 9 Dec 2006 17:47:12 -0000 1.3.2.2 --- RGPaletteView.cpp 26 Dec 2006 01:37:52 -0000 1.3.2.3 *************** *** 56,64 **** /************************************************************************/ ! /*$ XGPaletteView::XGPaletteView ! * ! * Try to construct me from my specification. ! */ ! XGPaletteView::XGPaletteView(XGView *parent, XGArgStream &stream) : XGView(parent,stream) { --- 56,64 ---- /************************************************************************/ ! // --------------------------------------------------------------------------- ! /// XGPaletteView ! // ! /// Try to construct me from my specification. ! // XGPaletteView::XGPaletteView(XGView *parent, XGArgStream &stream) : XGView(parent,stream) { *************** *** 76,85 **** } ! /* XGPaletteView::XGPaletteView ! * ! * Create from TMenu resource for construction purposes for ! * the Windows version of this. ! */ ! #if OPT_WINOS --- 76,85 ---- } ! // --------------------------------------------------------------------------- ! /// XGPaletteView ! // ! /// Create from TMenu resource for construction purposes for ! /// the Windows version of this. ! // #if OPT_WINOS *************** *** 106,114 **** #endif ! /*$ XGPaletteView::~XGPaletteView ! * ! * Go away ! */ ! XGPaletteView::~XGPaletteView() { --- 106,113 ---- #endif ! // --------------------------------------------------------------------------- ! /// ~XGPaletteView ! // ! /// Go away XGPaletteView::~XGPaletteView() { *************** *** 122,129 **** ! /* XGPaletteView::AddTool ! * ! * Adds a single tool to the toolbar. ! */ void XGPaletteView::AddTool(short icon, short commandID, char *tooltip) { --- 121,129 ---- ! // --------------------------------------------------------------------------- ! /// AddTool ! // ! /// Adds a single tool to the toolbar. ! // void XGPaletteView::AddTool(short icon, short commandID, char *tooltip) { *************** *** 161,169 **** /************************************************************************/ ! /*$ XGPaletteView::DoDrawView ! * ! * Draw this view ! */ ! void XGPaletteView::DoDrawView(Rect) { --- 161,169 ---- /************************************************************************/ ! // --------------------------------------------------------------------------- ! /// DoDrawView ! // ! /// Draw this view ! // void XGPaletteView::DoDrawView(Rect) { *************** *** 172,195 **** long i,len; - /* - * Draw the background of this thing - */ - - #if 0 // See what it's like without the background - draw.SetForeColor(KXGColorBtnShadow); - draw.MoveTo(r.left,r.top); - draw.LineTo(r.right,r.top); - r.top++; - draw.SetForeColor(KXGColorBtnHilite); - draw.MoveTo(r.left,r.top); - draw.LineTo(r.right,r.top); - r.top++; - - draw.SetForeColor(KXGColorBtnShadow); - draw.MoveTo(r.left,r.bottom-1); - draw.LineTo(r.right,r.bottom-1); - r.bottom--; - #endif - draw.FillRect(r, KXGColorBtnFace); draw.Draw3DRect(r,yaaf::KXGEOutset); --- 172,175 ---- *************** *** 209,217 **** } - /*$ XGPaletteView::DoMouseDown - * - * Handle mouse down event - */ bool XGPaletteView::DoMouseDown(Point where, short) { --- 189,198 ---- } + // --------------------------------------------------------------------------- + /// DoMouseDown + // + /// Handle mouse down event + // bool XGPaletteView::DoMouseDown(Point where, short) { *************** *** 238,246 **** } - /*$ XGPaletteView::DoMouseMove - * - * Handle mouse move event - */ void XGPaletteView::DoMouseMove(Point where, short flags) { --- 219,228 ---- } + // --------------------------------------------------------------------------- + /// DoMouseMove + // + /// Handle mouse move event + // void XGPaletteView::DoMouseMove(Point where, short flags) { *************** *** 284,292 **** } - /*$ XGPaletteView::DoMouseUp - * - * Handle menu command - */ void XGPaletteView::DoMouseUp(Point, short flags) { --- 266,275 ---- } + // --------------------------------------------------------------------------- + /// DoMouseUp + // + // + /// Handle menu command void XGPaletteView::DoMouseUp(Point, short flags) { *************** *** 297,306 **** { XGDraw draw(this); - //!!! { - // short len, i; - // len = GetToolLength(); - // DrawButton(draw,fHitWhere,fCurrentTool,kEnable); - // DrawButton(draw,fHitWhere,fHitWhat,kEnable|kDown); - // } if(fCurrentTool != fHitWhat) { --- 280,283 ---- *************** *** 309,322 **** DrawButton(draw, CalcButton(fCurrentTool), fCurrentTool, kEnable | kDown); } - // SendMenuCommand(GetItemCommand(fHitWhat)); GetParent()->DoDispatch(kPaletteMessage,GetViewID(),NULL); } } - /*$ XGPaletteView::DoMouseLeave - * - * The mouse has left the control - */ void XGPaletteView::DoMouseLeave() { --- 286,299 ---- DrawButton(draw, CalcButton(fCurrentTool), fCurrentTool, kEnable | kDown); } GetParent()->DoDispatch(kPaletteMessage,GetViewID(),NULL); } } + // --------------------------------------------------------------------------- + /// DoMouseLeave + // + /// The mouse has left the control + // void XGPaletteView::DoMouseLeave() { *************** *** 328,336 **** } - /*$ XGPaletteView::GetMinWidth - * - * Get the minimum width, the width of one button. - */ short XGPaletteView::GetMinWidth() { --- 305,314 ---- } + // --------------------------------------------------------------------------- + /// GetMinWidth + // + /// Get the minimum width, the width of one button. + // short XGPaletteView::GetMinWidth() { *************** *** 338,346 **** } - /*$ XGPaletteView::GetMinHeight - * - * Get the minimum height, the height of one button. - */ short XGPaletteView::GetMinHeight(short) { --- 316,325 ---- } + // --------------------------------------------------------------------------- + /// GetMinHeight + // + /// Get the minimum height, the height of one button. + // short XGPaletteView::GetMinHeight(short) { *************** *** 361,369 **** /************************************************************************/ ! /*$ XGPaletteView::GetToolLength ! * ! * # items in this ! */ ! short XGPaletteView::GetToolLength() { --- 340,348 ---- /************************************************************************/ ! // --------------------------------------------------------------------------- ! /// GetToolLength ! // ! /// # items in this ! // short XGPaletteView::GetToolLength() { *************** *** 371,379 **** } - /*$ XGPaletteView::GetItemIcon - * - * Item icon - */ short XGPaletteView::GetItemIcon(long item) { --- 350,359 ---- } + // --------------------------------------------------------------------------- + /// GetItemIcon + // + /// Item icon + // short XGPaletteView::GetItemIcon(long item) { *************** *** 381,389 **** } ! /*$ XGPaletteView::GetItemCommand ! * ! * Item icon ! */ ! short XGPaletteView::GetItemCommand(long item) { --- 361,367 ---- } ! // --------------------------------------------------------------------------- ! /// GetItemCommand ! // short XGPaletteView::GetItemCommand(long item) { *************** *** 391,398 **** } ! /*$ XGPaletteView::GetItemEnabled ! * ! * Item icon ! */ short XGPaletteView::GetItemEnabled(long item) { --- 369,376 ---- } ! ! // --------------------------------------------------------------------------- ! /// GetItemEnabled ! // short XGPaletteView::GetItemEnabled(long item) { *************** *** 400,403 **** --- 378,385 ---- } + + // --------------------------------------------------------------------------- + /// SetItemEnabled + // bool XGPaletteView::SetItemEnabled(long item, short isEnabled) { *************** *** 408,416 **** } - /*$ XGPaletteView::GetItemIcon - * - * Item icon - */ void XGPaletteView::GetItemHelp(long item, char *ptr) { --- 390,398 ---- } + // --------------------------------------------------------------------------- + /// GetItemIcon + // + // void XGPaletteView::GetItemHelp(long item, char *ptr) { *************** *** 418,426 **** } - /*$ XGPaletteView::GetItemOffset - * - * Get the offset of this particular item - */ long XGPaletteView::GetItemOffset(long item) { --- 400,409 ---- } + // --------------------------------------------------------------------------- + /// GetItemOffset + // + /// Get the offset of this particular item + // long XGPaletteView::GetItemOffset(long item) { *************** *** 434,437 **** --- 417,421 ---- } + /************************************************************************/ /* */ *************** *** 440,448 **** /************************************************************************/ ! /*$ XGPaletteView::SendMenuCommand ! * ! * Send the menu command ! */ ! void XGPaletteView::SendMenuCommand(long arg) { --- 424,431 ---- /************************************************************************/ ! // --------------------------------------------------------------------------- ! /// SendMenuCommand ! // ! /// Send the menu command void XGPaletteView::SendMenuCommand(long arg) { *************** *** 450,458 **** } - /*$ XGPaletteView::GetMenuStatus - * - * Get the menu status - */ char XGPaletteView::GetMenuStatus(long arg) { --- 433,442 ---- } + // --------------------------------------------------------------------------- + /// GetMenuStatus + // + /// Get the menu status + // char XGPaletteView::GetMenuStatus(long arg) { *************** *** 471,480 **** } - /*$ XGPaletteView::CalcButton - * - * Calculate where this button should go. This is based on - * several different parameters, including any 'skip' menu commands - */ Rect XGPaletteView::CalcButton(long pos) { --- 455,465 ---- } + // --------------------------------------------------------------------------- + /// CalcButton + // + /// Calculate where this button should go. This is based on + /// several different parameters, including any 'skip' menu commands + // Rect XGPaletteView::CalcButton(long pos) { *************** *** 514,522 **** } - /*$ XGPaletteView::OutlineButton - * - * outline the button specified, unoutlining the old button - */ void XGPaletteView::OutlineButton(long index) { --- 499,508 ---- } + // --------------------------------------------------------------------------- + /// OutlineButton + // + /// outline the button specified, unoutlining the old button + // void XGPaletteView::OutlineButton(long index) { *************** *** 548,557 **** } - /*$ XGPaletteView::DrawButton - * - * Draw the button icon specified at the location specified in the mode - * provided - */ void XGPaletteView::DrawButton(XGDraw &draw, Rect where, long index, unsigned char mode) { --- 534,543 ---- } + // --------------------------------------------------------------------------- + /// DrawButton + // + /// Draw the button icon specified at the location specified in the mode provided + // void XGPaletteView::DrawButton(XGDraw &draw, Rect where, long index, unsigned char mode) { *************** *** 566,571 **** if (0 == (mode & kEnable) || (GetItemEnabled(index) == 0)) { ! draw.Draw3DRect(where,yaaf::KXGEBackground); ! InsetRect(&where,3,3); draw.DrawIcon(icon,where.left,where.top,false); } --- 552,557 ---- if (0 == (mode & kEnable) || (GetItemEnabled(index) == 0)) { ! draw.DrawIcon(1075,where.left,where.top); ! InsetRect(&where,2,2); draw.DrawIcon(icon,where.left,where.top,false); } *************** *** 577,599 **** * Draw the outer frame down */ ! draw.SetForeColor(KXGColorBtnShadow); ! draw.MoveTo(where.right-1, where.top); ! draw.LineTo(where.left, where.top); ! draw.LineTo(where.left, where.bottom-1); ! draw.MoveTo(where.right-2, where.top+1); ! draw.LineTo(where.left+1, where.top+1); ! draw.LineTo(where.left+1, where.bottom-2); ! //*** ! draw.SetForeColor(KXGColorBtnHilite); ! draw.MoveTo(where.right-1, where.top+1); ! draw.LineTo(where.right-2, where.bottom-1); ! draw.LineTo(where.left+1, where.bottom-1); ! draw.MoveTo(where.right-2, where.top+2); ! draw.LineTo(where.right-2, where.bottom-2); ! draw.LineTo(where.left+2, where.bottom-2); ! InsetRect(&where,2,2); - draw.ClipRect(&where); - draw.DrawIcon(1069,where.left,where.top); draw.DrawIcon(icon,where.left,where.top); draw.ClipRect(NULL); --- 563,568 ---- * Draw the outer frame down */ ! draw.DrawIcon(1073,where.left,where.top); InsetRect(&where,2,2); draw.DrawIcon(icon,where.left,where.top); draw.ClipRect(NULL); *************** *** 601,608 **** else { ! draw.Draw3DRect(where,yaaf::KXGEBackground); InsetRect(&where,2,2); - draw.ClipRect(&where); - draw.DrawIcon(1069,where.left,where.top); draw.DrawIcon(icon,where.left,where.top); draw.ClipRect(NULL); --- 570,575 ---- else { ! draw.DrawIcon(1074,where.left,where.top); InsetRect(&where,2,2); draw.DrawIcon(icon,where.left,where.top); draw.ClipRect(NULL); |