Ejemplo n.º 1
0
BListView::BListView(BRect frame, const char* name, list_view_type type,
	uint32 resizingMode, uint32 flags)
	:
	BView(frame, name, resizingMode, flags)
{
	_InitObject(type);
}
Ejemplo n.º 2
0
BDecimalSpinner::BDecimalSpinner(BRect frame, const char* name,
	const char* label, BMessage* message, uint32 resizingMode, uint32 flags)
	:
	BAbstractSpinner(frame, name, label, message, resizingMode, flags)
{
	_InitObject();
}
Ejemplo n.º 3
0
BListView::BListView(BMessage* archive)
	:
	BView(archive)
{
	int32 listType;
	archive->FindInt32("_lv_type", &listType);
	_InitObject((list_view_type)listType);

	int32 i = 0;
	BMessage subData;
	while (archive->FindMessage("_l_items", i++, &subData) == B_OK) {
		BArchivable* object = instantiate_object(&subData);
		if (object == NULL)
			continue;

		BListItem* item = dynamic_cast<BListItem*>(object);
		if (item != NULL)
			AddItem(item);
	}

	if (archive->HasMessage("_msg")) {
		BMessage* invokationMessage = new BMessage;

		archive->FindMessage("_msg", invokationMessage);
		SetInvocationMessage(invokationMessage);
	}

	if (archive->HasMessage("_2nd_msg")) {
		BMessage* selectionMessage = new BMessage;

		archive->FindMessage("_2nd_msg", selectionMessage);
		SetSelectionMessage(selectionMessage);
	}
}
Ejemplo n.º 4
0
BDecimalSpinner::BDecimalSpinner(const char* name, const char* label,
	BMessage* message, uint32 flags)
	:
	BAbstractSpinner(name, label, message, flags)
{
	_InitObject();
}
Ejemplo n.º 5
0
BAbstractSpinner::BAbstractSpinner(const char* name, const char* label, BMessage* message,
	uint32 flags)
	:
	BControl(name, label, message, flags | B_WILL_DRAW | B_FRAME_EVENTS)
{
	_InitObject();
}
Ejemplo n.º 6
0
BStatusBar::BStatusBar(BMessage *archive)
    :
    BView(archive)
{
    _InitObject();

    archive->FindString("_label", &fLabel);
    archive->FindString("_tlabel", &fTrailingLabel);

    archive->FindString("_text", &fText);
    archive->FindString("_ttext", &fTrailingText);

    float floatValue;
    if (archive->FindFloat("_high", &floatValue) == B_OK) {
        fBarHeight = floatValue;
        fCustomBarHeight = true;
    }

    int32 color;
    if (archive->FindInt32("_bcolor", (int32 *)&color) == B_OK) {
        fBarColor = *(rgb_color *)&color;
        fInternalFlags |= kCustomBarColor;
    }

    if (archive->FindFloat("_val", &floatValue) == B_OK)
        fCurrent = floatValue;
    if (archive->FindFloat("_max", &floatValue) == B_OK)
        fMax = floatValue;
}
Ejemplo n.º 7
0
BSlider::BSlider(const char *name, const char *label, BMessage *message,
			int32 minValue, int32 maxValue, orientation posture,
			thumb_style thumbType, uint32 flags)
	: BControl(name, label, message, flags),
	fModificationMessage(NULL),
	fSnoozeAmount(20000),

	fMinLimitLabel(NULL),
	fMaxLimitLabel(NULL),

	fMinValue(minValue),
	fMaxValue(maxValue),
	fKeyIncrementValue(1),

	fHashMarkCount(0),
	fHashMarks(B_HASH_MARKS_NONE),

	fStyle(thumbType),

	fOrientation(posture),
	fBarThickness(6.0)
{
	_InitBarColor();

	_InitObject();
	SetValue(0);
}
Ejemplo n.º 8
0
BAlert::BAlert(const char *title, const char *text, const char *button1,
		const char *button2, const char *button3, button_width width,
		button_spacing spacing, alert_type type)
	: BWindow(DEFAULT_RECT, title, B_MODAL_WINDOW,
		B_NOT_CLOSABLE | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS)
{
	_InitObject(text, button1, button2, button3, width, spacing, type);
}
Ejemplo n.º 9
0
BStatusBar::BStatusBar(BRect frame, const char *name, const char *label,
                       const char *trailingLabel)
    :
    BView(frame, name, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW),
    fLabel(label),
    fTrailingLabel(trailingLabel)
{
    _InitObject();
}
Ejemplo n.º 10
0
Spinner::Spinner(BRect frame, const char *name, const char *label, BMessage *msg,
				uint32 resize,uint32 flags)
 :	BControl(frame,name,label,msg,resize,flags),
	fStep(1),
	fMin(0),
	fMax(100)
{
	_InitObject();
}
Ejemplo n.º 11
0
BJobSetupPanel::BJobSetupPanel(BPrinter* printer, uint32 flags)
    : BPrintPanel("Print document")
    , fPrinter(printer)
    , fPrinterRoster(NULL)
    , fPrintRange(B_ALL_PAGES)
    , fJobPanelFlags(flags)
{
    _InitObject();
    _SetupInterface();
}
Ejemplo n.º 12
0
BBox::BBox(BRect frame, const char *name, uint32 resizingMode, uint32 flags,
		border_style border)
	: BView(frame, name, resizingMode, flags  | B_WILL_DRAW | B_FRAME_EVENTS),
	  fStyle(border)
{
	SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
	SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));

	_InitObject();
}
Ejemplo n.º 13
0
BStatusBar::BStatusBar(const char *name, const char *label,
                       const char *trailingLabel)
    :
    BView(BRect(0, 0, -1, -1), name, B_FOLLOW_LEFT | B_FOLLOW_TOP,
         B_WILL_DRAW | B_SUPPORTS_LAYOUT),
    fLabel(label),
    fTrailingLabel(trailingLabel)
{
    _InitObject();
}
Ejemplo n.º 14
0
Spinner::Spinner(BMessage *data)
 :	BControl(data)
{
	if (data->FindInt32("_min",&fMin) != B_OK)
		fMin = 0;
	if (data->FindInt32("_max",&fMax) != B_OK)
		fMin = 100;
	if (data->FindInt32("_step",&fStep) != B_OK)
		fMin = 1;
	_InitObject();
}
Ejemplo n.º 15
0
BBox::BBox(border_style border, BView* child)
	: BView(NULL, B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP),
	  fStyle(border)
{
	SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
	SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));

	_InitObject();

	if (child)
		AddChild(child);
}
Ejemplo n.º 16
0
BBox::BBox(const char* name, uint32 flags, border_style border, BView* child)
	: BView(name, flags | B_WILL_DRAW | B_FRAME_EVENTS),
	  fStyle(border)
{
	SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
	SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));

	_InitObject();

	if (child)
		AddChild(child);
}
Ejemplo n.º 17
0
BAbstractSpinner::BAbstractSpinner(BMessage* data)
	:
	BControl(data),
	fButtonStyle(SPINNER_BUTTON_PLUS_MINUS)
{
	_InitObject();

	if (data->FindInt32("_align") != B_OK)
		fAlignment = B_ALIGN_LEFT;

	if (data->FindInt32("_button_style") != B_OK)
		fButtonStyle = SPINNER_BUTTON_PLUS_MINUS;

	if (data->FindInt32("_divider") != B_OK)
		fDivider = 0.0f;
}
Ejemplo n.º 18
0
BDecimalSpinner::BDecimalSpinner(BMessage* data)
	:
	BAbstractSpinner(data)
{
	_InitObject();

	if (data->FindDouble("_max", &fMaxValue) != B_OK)
		fMinValue = 100.0;

	if (data->FindDouble("_min", &fMinValue) != B_OK)
		fMinValue = 0.0;

	if (data->FindUInt32("_precision", &fPrecision) != B_OK)
		fPrecision = 2;

	if (data->FindDouble("_step", &fStep) != B_OK)
		fStep = 1.0;

	if (data->FindDouble("_val", &fValue) != B_OK)
		fValue = 0.0;
}
Ejemplo n.º 19
0
BBox::BBox(BMessage *archive)
	: BView(archive),
	  fStyle(B_FANCY_BORDER)
{
	_InitObject(archive);
}
Ejemplo n.º 20
0
BListView::BListView(const char* name, list_view_type type, uint32 flags)
	:
	BView(name, flags)
{
	_InitObject(type);
}
Ejemplo n.º 21
0
SOM_Scope void
SOMLINK ODLinkSpecInitLinkSpec(ODLinkSpec *somSelf,
                               Environment *ev,
                               IODDSOMExternalizedID linkService,
                               //XXXXX ODStorageUnitID partSUID,
                               ODPart* part,
                               ODByteArray* data)
{

/*
-------------------------------------------------------------------------------
1. Error if not currently in U state.
2. Initialize the ODObject
3. Save linkService, partSUID, data, and size; Enter the TI state.
-------------------------------------------------------------------------------
*/
    ODLinkSpecData *somThis = ODLinkSpecGetData(somSelf);
    ODLinkSpecMethodDebug("ODLinkSpec","ODLinkSpecInitLinkSpec");

// 1.
    if (_fState != ODLinkSpec_UNINIT)
      {
        THROW(kODErrCorruptLinkSpecValue);
      }

// 2.
    #ifndef _PLATFORM_OS2_
     SOM_CATCH return;
    #else
     SOM_TRY
    #endif

//   Can not call IsInitialized any more. Make sure InitObject can handle
//   initialization.

//    if ( !_IsInitialized(ev) )
      _InitObject(ev);


// 3.
    _fState=ODLinkSpec_TRANSIENT_INIT;
    _fSourcePartSUID=kODNULL; /* in case TRY fails */
    _fSourceLinkService = (IODDSOMExternalizedID) kODNULL; /* in case TRY fails */
    //_fData = (ODByteArray*) kODNULL;
    _fData = CreateEmptyByteArrayStruct(0);
    TRY
      //XXXXX __set_aSourcePartSUID(ev, partSUID);
      if (part != (ODPart*)kODNULL)
        _fSourcePartSUID=part->GetID(ev);
      else
        _fSourcePartSUID=0;

      _fSourceLinkService = ODISOStrFromCStr(linkService);
      if (data != (ODByteArray*) kODNULL)
        {
          _fData = CopyByteArrayStruct(data);
        }
      somSelf->InitBaseLinkSpec(ev, part, data); //XXXXX

    CATCH_ALL
      _VoidLinkSpec(ev);
      RERAISE;
    ENDTRY

    #ifdef _PLATFORM_OS2_
     SOM_CATCH_ALL
     SOM_ENDTRY
    return;
    #endif
 }
Ejemplo n.º 22
0
BSlider::BSlider(BMessage *archive)
	: BControl(archive)
{
	fModificationMessage = NULL;

	if (archive->HasMessage("_mod_msg")) {
		BMessage* message = new BMessage;

		archive->FindMessage("_mod_msg", message);

		SetModificationMessage(message);
	}

	if (archive->FindInt32("_sdelay", &fSnoozeAmount) != B_OK)
		SetSnoozeAmount(20000);

	rgb_color color;
	if (archive->FindInt32("_fcolor", (int32 *)&color) == B_OK)
		UseFillColor(true, &color);
	else
		UseFillColor(false);

	int32 orient;
	if (archive->FindInt32("_orient", &orient) == B_OK)
		fOrientation = (orientation)orient;
	else
		fOrientation = B_HORIZONTAL;

	fMinLimitLabel = NULL;
	fMaxLimitLabel = NULL;

	const char* minlbl = NULL;
	const char* maxlbl = NULL;

	archive->FindString("_minlbl", &minlbl);
	archive->FindString("_maxlbl", &maxlbl);

	SetLimitLabels(minlbl, maxlbl);

	if (archive->FindInt32("_min", &fMinValue) != B_OK)
		fMinValue = 0;

	if (archive->FindInt32("_max", &fMaxValue) != B_OK)
		fMaxValue = 100;

	if (archive->FindInt32("_incrementvalue", &fKeyIncrementValue) != B_OK)
		fKeyIncrementValue = 1;

	if (archive->FindInt32("_hashcount", &fHashMarkCount) != B_OK)
		fHashMarkCount = 11;

	int16 hashloc;
	if (archive->FindInt16("_hashloc", &hashloc) == B_OK)
		fHashMarks = (hash_mark_location)hashloc;
	else
		fHashMarks = B_HASH_MARKS_NONE;

	int16 sstyle;
	if (archive->FindInt16("_sstyle", &sstyle) == B_OK)
		fStyle = (thumb_style)sstyle;
	else
		fStyle = B_BLOCK_THUMB;

	if (archive->FindInt32("_bcolor", (int32 *)&color) != B_OK)
		color = tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), B_DARKEN_4_TINT);
	SetBarColor(color);

	float bthickness;
	if (archive->FindFloat("_bthickness", &bthickness) == B_OK)
		fBarThickness = bthickness;
	else
		fBarThickness = 6.0f;

	_InitObject();
}
Ejemplo n.º 23
0
BListView::BListView(list_view_type type)
	:
	BView(NULL, B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE)
{
	_InitObject(type);
}