basebar2.cpp File Reference

(r1785/r1282)

#include "camtypes.h"
#include "camframe.h"
#include "oilmods.h"
#include "dlgmgr.h"
#include "camelot.h"
#include "gallery.h"
#include "camview.h"
#include "keypress.h"
#include "selector.h"
#include "csrstack.h"
#include "bubbleid.h"
#include "basebar.h"

Go to the source code of this file.

Defines

#define DWORD_ALIGN(x)
#define NO_REDRAW   FALSE
#define COMBOHEIGHT   SMALLBUTTONHEIGHT - 2
#define IS_CHICAGO   ((LOBYTE(LOWORD(GetVersion()))) > 3)
#define COMMIT   2
#define Y_BASEUNITS   16
#define X_BASEUNITS   8
#define ROP_DSPDxax   0x00E20746L
 Calculates the area of the window which corresponds to the client area. This basically includes the whole window area, but excluding any dragbar. Paint the non-client area - this involves painting the dragbar and any controls it has, if any. Plots the given bitmap (srcDC) into the given rectangle of the destination (destDC). if srcDC == NULL, then just fills the button with grey, else...
#define ROP_PSDPxax   0x00B8074AL

Enumerations

enum  InfoBarWidths { LARGE_INFO_BAR = 910, SMALL_INFO_BAR = 774 }

Functions

BarItemType GetEnumItemType (BarItem *Item)
 To return an enumerated BarType from a BarItem.
static void PatB (wxDC &DC, INT32 x, INT32 y, INT32 dx, INT32 dy, wxColour &rgb)
 Paints a rectangle in the given (dithered) colour It looks pretty hideous, but this is how the MFC buttonbar does it... The conclusions that this leads to are left as an exercise for the reader. (OK, so they're not. It suggest that either MFC sux, or plotting text is easier/faster than creating a brush, in which case Windoze sux).


Define Documentation

#define COMBOHEIGHT   SMALLBUTTONHEIGHT - 2
 

Definition at line 200 of file basebar2.cpp.

#define COMMIT   2
 

Definition at line 204 of file basebar2.cpp.

#define DWORD_ALIGN  ) 
 

Definition at line 188 of file basebar2.cpp.

#define IS_CHICAGO   ((LOBYTE(LOWORD(GetVersion()))) > 3)
 

Definition at line 202 of file basebar2.cpp.

#define NO_REDRAW   FALSE
 

Definition at line 191 of file basebar2.cpp.

#define ROP_DSPDxax   0x00E20746L
 

Calculates the area of the window which corresponds to the client area. This basically includes the whole window area, but excluding any dragbar. Paint the non-client area - this involves painting the dragbar and any controls it has, if any. Plots the given bitmap (srcDC) into the given rectangle of the destination (destDC). if srcDC == NULL, then just fills the button with grey, else...

UIC

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/3/94
Parameters:
destDC - DC into which the BMP will be plotted [INPUTS] srcBitmap - source bitmap Pos - rectangle to plot into

Definition at line 5664 of file basebar2.cpp.

#define ROP_PSDPxax   0x00B8074AL
 

Definition at line 5667 of file basebar2.cpp.

#define X_BASEUNITS   8
 

Definition at line 207 of file basebar2.cpp.

#define Y_BASEUNITS   16
 

Definition at line 206 of file basebar2.cpp.


Enumeration Type Documentation

enum InfoBarWidths
 

Enumerator:
LARGE_INFO_BAR 
SMALL_INFO_BAR 

Definition at line 198 of file basebar2.cpp.

00198 { LARGE_INFO_BAR = 910, SMALL_INFO_BAR = 774 };


Function Documentation

BarItemType GetEnumItemType BarItem Item  ) 
 

To return an enumerated BarType from a BarItem.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/3/94
Parameters:
the baritem to type [INPUTS]
- [OUTPUTS]
Returns:
An Enumerated BarType

Errors: -

See also:
-

Definition at line 229 of file basebar2.cpp.

00230 {
00231     PORTNOTETRACE( "dialog", "GetEnumItemType - do nothing" );
00232 #ifndef EXCLUDE_FROM_XARALX
00233     if(Item == NULL)
00234         return UNKNOWN_ITEM;
00235     if (Item->IsKindOf(CC_RUNTIME_CLASS(BarControl)))
00236     {
00237         HWND hcontrol=(HWND)((BarControl*)Item)->GetWinID();    // Get the Window Handle
00238         
00239         String_256 ClassNameStr;
00240 
00241         GetClassName(hcontrol, (TCHAR*)ClassNameStr, 255);  // Check type of control
00242         if (ClassNameStr == String_16(TEXT("cc_BitmapButton")))
00243             return BITMAPBUTTON;
00244         if (ClassNameStr == String_16(TEXT("Button")))
00245             return BUTTON;
00246         if (ClassNameStr == String_16(TEXT("cc_SmallButton")))
00247             return SMALLBITMAPBUTTON;
00248         if (ClassNameStr == String_16(TEXT("Static")))
00249             return STATIC;
00250         if (ClassNameStr == String_16(TEXT("ComboBox")))
00251             return COMBO;                                            
00252         if (ClassNameStr == String_16(TEXT("Edit")))
00253             return EDIT;
00254         if (ClassNameStr == String_16(TEXT("cc_StaticBitmap")))
00255             return STATICBITMAP;
00256         if (ClassNameStr == String_16(TEXT("cc_Grid")))
00257             return ROTATEGRID;
00258         if (ClassNameStr == String_16(TEXT("cc_Text3D")))
00259             return TEXT3D;
00260         if (ClassNameStr == String_16(TEXT("cc_Slider")))
00261             return SLIDER;
00262         if (ClassNameStr == String_64(TEXT("cc_1dBitmapComboBoxEdit")))
00263             return BITMAPCOMBO1D;
00264         if (ClassNameStr == String_64(TEXT("cc_2dBitmapComboBoxEdit")))
00265             return BITMAPCOMBO2D;
00266         return OTHERCONTROL;
00267     }
00268 
00269     if ( Item->IsKindOf(CC_RUNTIME_CLASS(BarSeparator)) )
00270         return SEPARATOR;
00271     if ( Item->IsKindOf(CC_RUNTIME_CLASS(BarLineFeed)) )
00272         return LINEFEED;
00273     if ( Item->IsKindOf(CC_RUNTIME_CLASS(DDeckerTop)))
00274         return DECKER_TOP;
00275     if ( Item->IsKindOf(CC_RUNTIME_CLASS(DDeckerBottom)))
00276         return DECKER_BOTTOM;
00277     if ( Item->IsKindOf(CC_RUNTIME_CLASS(DDeckerEnd)))
00278         return DECKER_END;
00279     ENSURE(FALSE,"Unknown Bar Item");
00280 #endif
00281     return UNKNOWN_ITEM;
00282 }

static void PatB wxDC &  DC,
INT32  x,
INT32  y,
INT32  dx,
INT32  dy,
wxColour &  rgb
[static]
 

Paints a rectangle in the given (dithered) colour It looks pretty hideous, but this is how the MFC buttonbar does it... The conclusions that this leads to are left as an exercise for the reader. (OK, so they're not. It suggest that either MFC sux, or plotting text is easier/faster than creating a brush, in which case Windoze sux).

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> (Some MFC dude, actually)
Date:
14/3/94
Parameters:
hDC - destination DC [INPUTS] x,y,dx,dy - rectangle to fill rgb - colour to fill with
Scope: private

Definition at line 4619 of file basebar2.cpp.

04620 {
04621 #pragma message( __LOCMSG__ "PatB - do nothing" )
04622     TRACE( _T("Warning - PatB called") );
04623 /*  RECT rect;
04624 
04625     rect.x      = x;
04626     rect.y      = y;
04627     rect.width  = dx;
04628     rect.height = dy;
04629 
04630     cDC->SetBkColor(rgb);
04631     cDC->ExtTextOut(0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL); */
04632 }


Generated on Sat Nov 10 03:49:27 2007 for Camelot by  doxygen 1.4.4