// --------------------------------------------------------------- // MakeConfigurationView // // Makes a BView object for configuring / displaying info about // this translator. // // Preconditions: // // Parameters: ioExtension, configuration options for the // translator // // outView, the view to configure the // translator is stored here // // outExtent, the bounds of the view are // stored here // // Postconditions: // // Returns: // --------------------------------------------------------------- status_t BaseTranslator::MakeConfigurationView(BMessage *ioExtension, BView **outView, BRect *outExtent) { if (!outView || !outExtent) return B_BAD_VALUE; if (ioExtension && fSettings->LoadSettings(ioExtension) != B_OK) return B_BAD_VALUE; BView *view = NewConfigView(AcquireSettings()); // implemented in derived class if (view) { *outView = view; *outExtent = view->Bounds(); return B_OK; } else return BTranslator::MakeConfigurationView(ioExtension, outView, outExtent); }
// --------------------------------------------------------------- // MakeConfigurationView // // Makes a BView object for configuring / displaying info about // this translator. // // Preconditions: // // Parameters: ioExtension, configuration options for the // translator // // outView, the view to configure the // translator is stored here // // outExtent, the bounds of the view are // stored here // // Postconditions: // // Returns: // --------------------------------------------------------------- status_t BaseTranslator::MakeConfigurationView(BMessage *ioExtension, BView **outView, BRect *outExtent) { if (!outView || !outExtent) return B_BAD_VALUE; if (ioExtension && fSettings->LoadSettings(ioExtension) != B_OK) return B_BAD_VALUE; BView *view = NewConfigView(AcquireSettings()); // implemented in derived class if (view) { *outView = view; if ((view->Flags() & B_SUPPORTS_LAYOUT) != 0) view->ResizeTo(view->ExplicitPreferredSize()); *outExtent = view->Bounds(); return B_OK; } else return BTranslator::MakeConfigurationView(ioExtension, outView, outExtent); }