Apply patch from Maxime Simon to make several translators use the Layout API.
There are a few small changes from myself, such as adding a copyright for Maxime in files with bigger changes. Also because this patch was so old I had to do some manual patching, and added back the title and description on the TGA and TIFF translators. I think this improves things a lot, though there is still some work to do to improve the consistency of the translator settings views. I think this mostly fixes #2117, though I may leave the ticket open until a few more things are resolved. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35769 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008, Jérôme Duval. All rights reserved.
|
* Copyright 2008, Jérôme Duval. All rights reserved.
|
||||||
* Copyright 2005-2007, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2005-2007, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
|
* Copyright 2009, Maxime Simon, [email protected]. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -10,57 +11,63 @@
|
|||||||
|
|
||||||
#include <StringView.h>
|
#include <StringView.h>
|
||||||
#include <CheckBox.h>
|
#include <CheckBox.h>
|
||||||
|
#include <GroupLayout.h>
|
||||||
|
#include <GroupLayoutBuilder.h>
|
||||||
|
#include <SpaceLayoutItem.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags)
|
ConfigView::ConfigView(uint32 flags)
|
||||||
: BView(frame, "EXRTranslator Settings", resize, flags)
|
: BView("EXRTranslator Settings", flags)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
|
||||||
font_height fontHeight;
|
BStringView *fTitle = new BStringView("title", "EXR Images");
|
||||||
be_bold_font->GetHeight(&fontHeight);
|
fTitle->SetFont(be_bold_font);
|
||||||
float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading;
|
|
||||||
|
|
||||||
BRect rect(10, 10, 200, 10 + height);
|
|
||||||
BStringView *stringView = new BStringView(rect, "title", "EXR images");
|
|
||||||
stringView->SetFont(be_bold_font);
|
|
||||||
stringView->ResizeToPreferred();
|
|
||||||
AddChild(stringView);
|
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 10);
|
|
||||||
char version[256];
|
char version[256];
|
||||||
sprintf(version, "Version %d.%d.%d, %s",
|
sprintf(version, "Version %d.%d.%d, %s",
|
||||||
int(B_TRANSLATION_MAJOR_VERSION(EXR_TRANSLATOR_VERSION)),
|
int(B_TRANSLATION_MAJOR_VERSION(EXR_TRANSLATOR_VERSION)),
|
||||||
int(B_TRANSLATION_MINOR_VERSION(EXR_TRANSLATOR_VERSION)),
|
int(B_TRANSLATION_MINOR_VERSION(EXR_TRANSLATOR_VERSION)),
|
||||||
int(B_TRANSLATION_REVISION_VERSION(EXR_TRANSLATOR_VERSION)),
|
int(B_TRANSLATION_REVISION_VERSION(EXR_TRANSLATOR_VERSION)),
|
||||||
__DATE__);
|
__DATE__);
|
||||||
stringView = new BStringView(rect, "version", version);
|
BStringView *fVersion = new BStringView("version", version);
|
||||||
stringView->ResizeToPreferred();
|
|
||||||
AddChild(stringView);
|
|
||||||
|
|
||||||
GetFontHeight(&fontHeight);
|
BStringView *fCopyright = new BStringView("copyright",
|
||||||
height = fontHeight.descent + fontHeight.ascent + fontHeight.leading;
|
B_UTF8_COPYRIGHT "2008 Haiku Inc.");
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 5);
|
BStringView *fCopyright2 = new BStringView("copyright2",
|
||||||
stringView = new BStringView(rect, "copyright", B_UTF8_COPYRIGHT "2008 Haiku Inc.");
|
"Based on OpenEXR (http://www.openexr.com)");
|
||||||
stringView->ResizeToPreferred();
|
|
||||||
AddChild(stringView);
|
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 10);
|
BStringView *fCopyright3 = new BStringView("copyright3",
|
||||||
stringView = new BStringView(rect, "copyright2", "Based on OpenEXR (http://www.openexr.com)");
|
B_UTF8_COPYRIGHT "2006, Industrial Light & Magic,");
|
||||||
stringView->ResizeToPreferred();
|
|
||||||
AddChild(stringView);
|
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 5);
|
BStringView *fCopyright4 = new BStringView("copyright4",
|
||||||
stringView = new BStringView(rect, "copyright3", B_UTF8_COPYRIGHT "2006, Industrial Light & Magic, a division of Lucasfilm "
|
"a division of Lucasfilm Entertainment Company Ltd");
|
||||||
"Entertainment Company Ltd");
|
|
||||||
stringView->ResizeToPreferred();
|
// Build the layout
|
||||||
AddChild(stringView);
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
|
|
||||||
|
AddChild(BGroupLayoutBuilder(B_VERTICAL, 7)
|
||||||
|
.Add(fTitle)
|
||||||
|
.Add(fVersion)
|
||||||
|
.AddGlue()
|
||||||
|
.Add(fCopyright)
|
||||||
|
.Add(fCopyright2)
|
||||||
|
.AddGlue()
|
||||||
|
.Add(fCopyright3)
|
||||||
|
.Add(fCopyright4)
|
||||||
|
.AddGlue()
|
||||||
|
.SetInsets(5, 5, 5, 5)
|
||||||
|
);
|
||||||
|
|
||||||
|
BFont font;
|
||||||
|
GetFont(&font);
|
||||||
|
SetExplicitPreferredSize(BSize((font.Size() * 400)/12, (font.Size() * 200)/12));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ConfigView::~ConfigView()
|
ConfigView::~ConfigView()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
class ConfigView : public BView {
|
class ConfigView : public BView {
|
||||||
public:
|
public:
|
||||||
ConfigView(const BRect &frame, uint32 resize = B_FOLLOW_ALL,
|
ConfigView(uint32 flags = B_WILL_DRAW);
|
||||||
uint32 flags = B_WILL_DRAW);
|
|
||||||
virtual ~ConfigView();
|
virtual ~ConfigView();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ EXRTranslator::DerivedTranslate(BPositionIO* source,
|
|||||||
BView *
|
BView *
|
||||||
EXRTranslator::NewConfigView(TranslatorSettings *settings)
|
EXRTranslator::NewConfigView(TranslatorSettings *settings)
|
||||||
{
|
{
|
||||||
return new ConfigView(BRect(0, 0, 225, 175));
|
return new ConfigView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ main(int /*argc*/, char **/*argv*/)
|
|||||||
BApplication app("application/x-vnd.Haiku-EXRTranslator");
|
BApplication app("application/x-vnd.Haiku-EXRTranslator");
|
||||||
|
|
||||||
status_t result;
|
status_t result;
|
||||||
result = LaunchTranslatorWindow(new EXRTranslator, "EXR Settings", BRect(0, 0, 225, 175));
|
result = LaunchTranslatorWindow(new EXRTranslator, "EXR Settings");
|
||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,10 @@ translation_format outputFormats[] = {
|
|||||||
status_t
|
status_t
|
||||||
MakeConfig(BMessage *ioExtension, BView **outView, BRect *outExtent)
|
MakeConfig(BMessage *ioExtension, BView **outView, BRect *outExtent)
|
||||||
{
|
{
|
||||||
outExtent->Set(0, 0, 239, 239);
|
GIFView *gifview = new GIFView("TranslatorView");
|
||||||
GIFView *gifview = new GIFView(*outExtent, "TranslatorView");
|
|
||||||
*outView = gifview;
|
*outView = gifview;
|
||||||
|
gifview->ResizeTo(gifview->ExplicitPreferredSize());
|
||||||
|
*outExtent = gifview->Bounds();
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,10 +14,14 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Additional authors: Stephan Aßmus, <[email protected]>
|
// Additional authors: Stephan Aßmus, <[email protected]>
|
||||||
|
// Maxime Simon, <[email protected]>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <GridLayoutBuilder.h>
|
||||||
|
#include <GroupLayout.h>
|
||||||
|
#include <GroupLayoutBuilder.h>
|
||||||
#include <InterfaceKit.h>
|
#include <InterfaceKit.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
|
||||||
@@ -30,41 +34,21 @@ extern int32 translatorVersion;
|
|||||||
extern char translatorName[];
|
extern char translatorName[];
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
GIFView::GIFView(BRect rect, const char *name)
|
GIFView::GIFView(const char *name)
|
||||||
: BView(rect, name, B_FOLLOW_ALL, B_WILL_DRAW)
|
: BView(name, B_WILL_DRAW)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
|
||||||
font_height fh;
|
|
||||||
be_bold_font->GetHeight(&fh);
|
|
||||||
BRect r(10, 15, 10 + be_bold_font->StringWidth(translatorName),
|
|
||||||
15 + fh.ascent + fh.descent);
|
|
||||||
|
|
||||||
BStringView *title = new BStringView(r, "Title", translatorName);
|
BStringView *title = new BStringView("Title", translatorName);
|
||||||
title->SetFont(be_bold_font);
|
title->SetFont(be_bold_font);
|
||||||
AddChild(title);
|
|
||||||
|
|
||||||
char version_string[100];
|
char version_string[100];
|
||||||
sprintf(version_string, "v%d.%d.%d %s", (int)(translatorVersion >> 8), (int)((translatorVersion >> 4) & 0xf),
|
sprintf(version_string, "v%d.%d.%d %s", (int)(translatorVersion >> 8), (int)((translatorVersion >> 4) & 0xf),
|
||||||
(int)(translatorVersion & 0xf), __DATE__);
|
(int)(translatorVersion & 0xf), __DATE__);
|
||||||
be_plain_font->GetHeight(&fh);
|
BStringView *version = new BStringView("Version", version_string);
|
||||||
r.bottom = r.top + fh.ascent + fh.descent;
|
|
||||||
r.left = r.right + 2.0 * r.Height();
|
|
||||||
r.right = r.left + be_plain_font->StringWidth(version_string);
|
|
||||||
|
|
||||||
BStringView *version = new BStringView(r, "Version", version_string);
|
|
||||||
version->SetFont(be_plain_font);
|
|
||||||
AddChild(version);
|
|
||||||
|
|
||||||
const char *copyrightString = "©2003 Daniel Switkin, [email protected]";
|
const char *copyrightString = "©2003 Daniel Switkin, [email protected]";
|
||||||
r.top = r.bottom + 5;
|
BStringView *copyright = new BStringView("Copyright", copyrightString);
|
||||||
r.left = 10;
|
|
||||||
r.bottom = r.top + fh.ascent + fh.descent;
|
|
||||||
r.right = rect.right - 10;
|
|
||||||
|
|
||||||
BStringView *copyright = new BStringView(r, "Copyright", copyrightString);
|
|
||||||
copyright->ResizeToPreferred();
|
|
||||||
AddChild(copyright);
|
|
||||||
|
|
||||||
// menu fields (Palette & Colors)
|
// menu fields (Palette & Colors)
|
||||||
fWebSafeMI = new BMenuItem("Websafe", new BMessage(GV_WEB_SAFE), 0, 0);
|
fWebSafeMI = new BMenuItem("Websafe", new BMessage(GV_WEB_SAFE), 0, 0);
|
||||||
@@ -89,81 +73,34 @@ GIFView::GIFView(BRect rect, const char *name)
|
|||||||
count *= 2;
|
count *= 2;
|
||||||
}
|
}
|
||||||
fColorCount256MI = fColorCountMI[7];
|
fColorCount256MI = fColorCountMI[7];
|
||||||
|
|
||||||
r.top = r.bottom + 14;
|
|
||||||
r.bottom = r.top + 24;
|
|
||||||
fPaletteMF = new BMenuField(r, "PaletteMenuField", "Palette: ",
|
|
||||||
fPaletteM, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
|
|
||||||
AddChild(fPaletteMF);
|
|
||||||
|
|
||||||
r.top = r.bottom + 5;
|
|
||||||
r.bottom = r.top + 24;
|
|
||||||
fColorCountMF = new BMenuField(r, "ColorCountMenuField", "Colors: ",
|
|
||||||
fColorCountM, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
|
|
||||||
AddChild(fColorCountMF);
|
|
||||||
|
|
||||||
// align menu fields
|
|
||||||
float maxLabelWidth = ceilf(max_c(be_plain_font->StringWidth("Colors: "),
|
|
||||||
be_plain_font->StringWidth("Palette: ")));
|
|
||||||
fPaletteMF->SetDivider(maxLabelWidth + 7);
|
|
||||||
fColorCountMF->SetDivider(maxLabelWidth + 7);
|
|
||||||
|
|
||||||
// check boxen
|
|
||||||
r.top = fColorCountMF->Frame().bottom + 5;
|
|
||||||
r.bottom = r.top + 10;
|
|
||||||
fUseDitheringCB = new BCheckBox(r, "UseDithering", "Use dithering",
|
|
||||||
new BMessage(GV_USE_DITHERING));
|
|
||||||
AddChild(fUseDitheringCB);
|
|
||||||
|
|
||||||
r.top = fUseDitheringCB->Frame().bottom + 2;
|
|
||||||
r.bottom = r.top + 10;
|
|
||||||
fInterlacedCB = new BCheckBox(r, "Interlaced", "Write interlaced images",
|
|
||||||
new BMessage(GV_INTERLACED));
|
|
||||||
AddChild(fInterlacedCB);
|
|
||||||
|
|
||||||
r.top = fInterlacedCB->Frame().bottom + 2;
|
|
||||||
r.bottom = r.top + 10;
|
|
||||||
fUseTransparentCB = new BCheckBox(r, "UseTransparent", "Write transparent images",
|
|
||||||
new BMessage(GV_USE_TRANSPARENT));
|
|
||||||
AddChild(fUseTransparentCB);
|
|
||||||
|
|
||||||
// radio buttons
|
|
||||||
r.top = fUseTransparentCB->Frame().bottom + 2;
|
|
||||||
r.bottom = r.top + 10;
|
|
||||||
r.right = r.left + be_plain_font->StringWidth("Automatic (from alpha channel)") + 20;
|
|
||||||
fUseTransparentAutoRB = new BRadioButton(r, "UseTransparentAuto", "Automatic (from alpha channel)",
|
|
||||||
new BMessage(GV_USE_TRANSPARENT_AUTO));
|
|
||||||
AddChild(fUseTransparentAutoRB);
|
|
||||||
|
|
||||||
r.top = fUseTransparentAutoRB->Frame().bottom + 0;
|
|
||||||
r.bottom = r.top + 10;
|
|
||||||
r.left = 10;
|
|
||||||
r.right = r.left + be_plain_font->StringWidth("Use RGB color") + 20;
|
|
||||||
fUseTransparentColorRB = new BRadioButton(r, "UseTransparentColor", "Use RGB color",
|
|
||||||
new BMessage(GV_USE_TRANSPARENT_COLOR));
|
|
||||||
AddChild(fUseTransparentColorRB);
|
|
||||||
|
|
||||||
r.left = r.right + 1;
|
|
||||||
r.right = r.left + 30;
|
|
||||||
fTransparentRedTC = new BTextControl(r, "TransparentRed", "", "0",
|
|
||||||
new BMessage(GV_TRANSPARENT_RED));
|
|
||||||
AddChild(fTransparentRedTC);
|
|
||||||
fTransparentRedTC->SetDivider(0);
|
|
||||||
|
|
||||||
r.left = r.right + 5;
|
|
||||||
r.right = r.left + 30;
|
|
||||||
fTransparentGreenTC = new BTextControl(r, "TransparentGreen", "", "0",
|
|
||||||
new BMessage(GV_TRANSPARENT_GREEN));
|
|
||||||
AddChild(fTransparentGreenTC);
|
|
||||||
fTransparentGreenTC->SetDivider(0);
|
|
||||||
|
|
||||||
r.left = r.right + 5;
|
|
||||||
r.right = r.left + 30;
|
|
||||||
fTransparentBlueTC = new BTextControl(r, "TransparentBlue", "", "0",
|
|
||||||
new BMessage(GV_TRANSPARENT_BLUE));
|
|
||||||
AddChild(fTransparentBlueTC);
|
|
||||||
fTransparentBlueTC->SetDivider(0);
|
|
||||||
|
|
||||||
|
fPaletteMF = new BMenuField("Palette", fPaletteM, NULL);
|
||||||
|
|
||||||
|
fColorCountMF = new BMenuField("Colors", fColorCountM, NULL);
|
||||||
|
|
||||||
|
// check boxes
|
||||||
|
fUseDitheringCB = new BCheckBox("Use dithering",
|
||||||
|
new BMessage(GV_USE_DITHERING));
|
||||||
|
|
||||||
|
fInterlacedCB = new BCheckBox("Write interlaced images",
|
||||||
|
new BMessage(GV_INTERLACED));
|
||||||
|
|
||||||
|
fUseTransparentCB = new BCheckBox("Write transparent images",
|
||||||
|
new BMessage(GV_USE_TRANSPARENT));
|
||||||
|
|
||||||
|
// radio buttons
|
||||||
|
fUseTransparentAutoRB = new BRadioButton("Automatic (from alpha channel)",
|
||||||
|
new BMessage(GV_USE_TRANSPARENT_AUTO));
|
||||||
|
|
||||||
|
fUseTransparentColorRB = new BRadioButton("Use RGB color",
|
||||||
|
new BMessage(GV_USE_TRANSPARENT_COLOR));
|
||||||
|
|
||||||
|
fTransparentRedTC = new BTextControl("", "0", new BMessage(GV_TRANSPARENT_RED));
|
||||||
|
|
||||||
|
fTransparentGreenTC = new BTextControl("", "0", new BMessage(GV_TRANSPARENT_GREEN));
|
||||||
|
|
||||||
|
fTransparentBlueTC = new BTextControl("", "0", new BMessage(GV_TRANSPARENT_BLUE));
|
||||||
|
|
||||||
BTextView *tr = fTransparentRedTC->TextView();
|
BTextView *tr = fTransparentRedTC->TextView();
|
||||||
BTextView *tg = fTransparentGreenTC->TextView();
|
BTextView *tg = fTransparentGreenTC->TextView();
|
||||||
BTextView *tb = fTransparentBlueTC->TextView();
|
BTextView *tb = fTransparentBlueTC->TextView();
|
||||||
@@ -176,10 +113,45 @@ GIFView::GIFView(BRect rect, const char *name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RestorePrefs();
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
|
|
||||||
if (copyright->Frame().right + 10 > Bounds().Width())
|
AddChild(BGroupLayoutBuilder(B_VERTICAL, 7)
|
||||||
ResizeTo(copyright->Frame().right + 10, Bounds().Height());
|
.Add(BGridLayoutBuilder(10, 10)
|
||||||
|
.Add(title, 0, 0)
|
||||||
|
.Add(version, 1, 0)
|
||||||
|
)
|
||||||
|
.Add(copyright)
|
||||||
|
.AddGlue()
|
||||||
|
|
||||||
|
.Add(BGridLayoutBuilder(10, 10)
|
||||||
|
.Add(fPaletteMF->CreateLabelLayoutItem(), 0, 0)
|
||||||
|
.Add(fPaletteMF->CreateMenuBarLayoutItem(), 1, 0)
|
||||||
|
|
||||||
|
.Add(fColorCountMF->CreateLabelLayoutItem(), 0, 1)
|
||||||
|
.Add(fColorCountMF->CreateMenuBarLayoutItem(), 1, 1)
|
||||||
|
)
|
||||||
|
.AddGlue()
|
||||||
|
|
||||||
|
.Add(fUseDitheringCB)
|
||||||
|
.Add(fInterlacedCB)
|
||||||
|
.Add(fUseTransparentCB)
|
||||||
|
|
||||||
|
.Add(fUseTransparentAutoRB)
|
||||||
|
.Add(BGridLayoutBuilder(10, 10)
|
||||||
|
.Add(fUseTransparentColorRB, 0, 0)
|
||||||
|
.Add(fTransparentRedTC, 1, 0)
|
||||||
|
.Add(fTransparentGreenTC, 2, 0)
|
||||||
|
.Add(fTransparentBlueTC, 3, 0)
|
||||||
|
)
|
||||||
|
.AddGlue()
|
||||||
|
.SetInsets(5, 5, 5, 5)
|
||||||
|
);
|
||||||
|
|
||||||
|
BFont font;
|
||||||
|
GetFont(&font);
|
||||||
|
SetExplicitPreferredSize(BSize((font.Size() * 400)/12, (font.Size() * 300)/12));
|
||||||
|
|
||||||
|
RestorePrefs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class Prefs;
|
|||||||
|
|
||||||
class GIFView : public BView {
|
class GIFView : public BView {
|
||||||
public:
|
public:
|
||||||
GIFView(BRect rect, const char* name);
|
GIFView(const char* name);
|
||||||
virtual ~GIFView();
|
virtual ~GIFView();
|
||||||
|
|
||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
|
|||||||
@@ -16,13 +16,13 @@
|
|||||||
#include "GIFWindow.h"
|
#include "GIFWindow.h"
|
||||||
#include "GIFView.h"
|
#include "GIFView.h"
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
|
#include <GroupLayout.h>
|
||||||
|
|
||||||
GIFWindow::GIFWindow(BRect rect, const char *name) :
|
GIFWindow::GIFWindow(BRect rect, const char *name) :
|
||||||
BWindow(rect, name, B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE,
|
BWindow(rect, name, B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
|
||||||
B_CURRENT_WORKSPACE) {
|
| B_AUTO_UPDATE_SIZE_LIMITS, B_CURRENT_WORKSPACE) {
|
||||||
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
BRect r(Bounds());
|
gifview = new GIFView("GIFView");
|
||||||
gifview = new GIFView(r, "GIFView");
|
|
||||||
AddChild(gifview);
|
AddChild(gifview);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
|
#include <GroupLayout.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -20,10 +21,11 @@ class PPMWindow :
|
|||||||
public BWindow
|
public BWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PPMWindow(
|
PPMWindow(BRect area) :
|
||||||
BRect area) :
|
BWindow(area, "PPM Settings", B_TITLED_WINDOW,
|
||||||
BWindow(area, "PPM Settings", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE)
|
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
|
||||||
{
|
{
|
||||||
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
}
|
}
|
||||||
~PPMWindow()
|
~PPMWindow()
|
||||||
{
|
{
|
||||||
@@ -39,7 +41,7 @@ main()
|
|||||||
{
|
{
|
||||||
BApplication app("application/x-vnd.Haiku-PPMTranslator");
|
BApplication app("application/x-vnd.Haiku-PPMTranslator");
|
||||||
BView * v = NULL;
|
BView * v = NULL;
|
||||||
BRect r(0,0,225,175);
|
BRect r(0, 0, 1, 1);
|
||||||
if (MakeConfig(NULL, &v, &r)) {
|
if (MakeConfig(NULL, &v, &r)) {
|
||||||
BAlert * err = new BAlert("Error", "Something is wrong with the PPMTranslator!", "OK");
|
BAlert * err = new BAlert("Error", "Something is wrong with the PPMTranslator!", "OK");
|
||||||
err->Go();
|
err->Go();
|
||||||
|
|||||||
@@ -21,6 +21,11 @@
|
|||||||
#include <MenuItem.h>
|
#include <MenuItem.h>
|
||||||
#include <CheckBox.h>
|
#include <CheckBox.h>
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
|
#include <StringView.h>
|
||||||
|
#include <GridLayoutBuilder.h>
|
||||||
|
#include <GroupLayout.h>
|
||||||
|
#include <GroupLayoutBuilder.h>
|
||||||
|
#include <SpaceLayoutItem.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -430,14 +435,28 @@ class PPMView :
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PPMView(
|
PPMView(
|
||||||
const BRect & frame,
|
|
||||||
const char * name,
|
const char * name,
|
||||||
uint32 resize,
|
|
||||||
uint32 flags) :
|
uint32 flags) :
|
||||||
BView(frame, name, resize, flags)
|
BView(name, flags)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
SetLowColor(ViewColor());
|
SetLowColor(ViewColor());
|
||||||
|
|
||||||
|
mTitle = new BStringView("title", "PPM Image Translator");
|
||||||
|
mTitle->SetFont(be_bold_font);
|
||||||
|
|
||||||
|
char detail[100];
|
||||||
|
int ver = static_cast<int>(translatorVersion);
|
||||||
|
sprintf(detail, "Version %d.%d.%d %s", ver >> 8, ((ver >> 4) & 0xf),
|
||||||
|
(ver & 0xf), __DATE__);
|
||||||
|
mDetail = new BStringView("detail", detail);
|
||||||
|
|
||||||
|
mBasedOn = new BStringView("basedOn",
|
||||||
|
"Based on PPMTranslator sample code");
|
||||||
|
|
||||||
|
mCopyright = new BStringView("copyright",
|
||||||
|
"Sample code copyright 1999, Be Incorporated");
|
||||||
|
|
||||||
mMenu = new BPopUpMenu("Color Space");
|
mMenu = new BPopUpMenu("Color Space");
|
||||||
mMenu->AddItem(new BMenuItem("None", CSMessage(B_NO_COLOR_SPACE)));
|
mMenu->AddItem(new BMenuItem("None", CSMessage(B_NO_COLOR_SPACE)));
|
||||||
mMenu->AddItem(new BMenuItem("RGB 8:8:8 32 bits", CSMessage(B_RGB32)));
|
mMenu->AddItem(new BMenuItem("RGB 8:8:8 32 bits", CSMessage(B_RGB32)));
|
||||||
@@ -458,18 +477,37 @@ public:
|
|||||||
mMenu->AddItem(new BMenuItem("RGB 5:5:5 16 bits big-endian", CSMessage(B_RGB15_BIG)));
|
mMenu->AddItem(new BMenuItem("RGB 5:5:5 16 bits big-endian", CSMessage(B_RGB15_BIG)));
|
||||||
mMenu->AddItem(new BMenuItem("RGBA 5:5:5:1 16 bits big-endian", CSMessage(B_RGBA15_BIG)));
|
mMenu->AddItem(new BMenuItem("RGBA 5:5:5:1 16 bits big-endian", CSMessage(B_RGBA15_BIG)));
|
||||||
mMenu->AddItem(new BMenuItem("RGB 5:6:5 16 bits big-endian", CSMessage(B_RGB16)));
|
mMenu->AddItem(new BMenuItem("RGB 5:6:5 16 bits big-endian", CSMessage(B_RGB16)));
|
||||||
mField = new BMenuField(BRect(10,110,190,130), "Color Space Field", "Input color space", mMenu);
|
mField = new BMenuField("Input Color Space", mMenu, NULL);
|
||||||
mField->SetDivider(mField->StringWidth(mField->Label()) + 7);
|
mField->SetViewColor(ViewColor());
|
||||||
mField->SetViewColor(ViewColor());
|
SelectColorSpace(g_settings.out_space);
|
||||||
AddChild(mField);
|
BMessage * msg = new BMessage(CHANGE_ASCII);
|
||||||
SelectColorSpace(g_settings.out_space);
|
mAscii = new BCheckBox("Write ASCII", msg);
|
||||||
BMessage * msg = new BMessage(CHANGE_ASCII);
|
if (g_settings.write_ascii)
|
||||||
mAscii = new BCheckBox(BRect(10,135,170,155), "Write ASCII", "Write ASCII", msg);
|
mAscii->SetValue(1);
|
||||||
if (g_settings.write_ascii) {
|
mAscii->SetViewColor(ViewColor());
|
||||||
mAscii->SetValue(1);
|
|
||||||
}
|
// Build the layout
|
||||||
mAscii->SetViewColor(ViewColor());
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
AddChild(mAscii);
|
|
||||||
|
AddChild(BGroupLayoutBuilder(B_VERTICAL, 7)
|
||||||
|
.Add(mTitle)
|
||||||
|
.Add(mDetail)
|
||||||
|
.AddGlue()
|
||||||
|
.Add(mBasedOn)
|
||||||
|
.Add(mCopyright)
|
||||||
|
.AddGlue()
|
||||||
|
.Add(BGridLayoutBuilder(10, 10)
|
||||||
|
.Add(mField->CreateLabelLayoutItem(), 0, 0)
|
||||||
|
.Add(mField->CreateMenuBarLayoutItem(), 1, 0)
|
||||||
|
.Add(mAscii, 0, 1)
|
||||||
|
)
|
||||||
|
.AddGlue()
|
||||||
|
.SetInsets(5, 5, 5, 5)
|
||||||
|
);
|
||||||
|
|
||||||
|
BFont font;
|
||||||
|
GetFont(&font);
|
||||||
|
SetExplicitPreferredSize(BSize((font.Size() * 350)/12, (font.Size() * 200)/12));
|
||||||
}
|
}
|
||||||
~PPMView()
|
~PPMView()
|
||||||
{
|
{
|
||||||
@@ -481,36 +519,6 @@ public:
|
|||||||
CHANGE_ASCII
|
CHANGE_ASCII
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void Draw(
|
|
||||||
BRect area)
|
|
||||||
{
|
|
||||||
SetFont(be_bold_font);
|
|
||||||
font_height fh;
|
|
||||||
GetFontHeight(&fh);
|
|
||||||
float xbold, ybold;
|
|
||||||
xbold = fh.descent + 1;
|
|
||||||
ybold = fh.ascent + fh.descent * 2 + fh.leading;
|
|
||||||
|
|
||||||
char title[] = "PPM image translator";
|
|
||||||
DrawString(title, BPoint(xbold, ybold));
|
|
||||||
|
|
||||||
SetFont(be_plain_font);
|
|
||||||
font_height plainh;
|
|
||||||
GetFontHeight(&plainh);
|
|
||||||
float yplain;
|
|
||||||
yplain = plainh.ascent + plainh.descent * 2 + plainh.leading;
|
|
||||||
|
|
||||||
char detail[100];
|
|
||||||
int ver = static_cast<int>(translatorVersion);
|
|
||||||
sprintf(detail, "Version %d.%d.%d %s", ver >> 8, ((ver >> 4) & 0xf),
|
|
||||||
(ver & 0xf), __DATE__);
|
|
||||||
DrawString(detail, BPoint(xbold, yplain + ybold));
|
|
||||||
|
|
||||||
DrawString("Based on PPMTranslator sample code",
|
|
||||||
BPoint(xbold, yplain * 3 + ybold));
|
|
||||||
DrawString("Sample code copyright 1999, Be Incorporated",
|
|
||||||
BPoint(xbold, yplain * 4 + ybold));
|
|
||||||
}
|
|
||||||
virtual void MessageReceived(
|
virtual void MessageReceived(
|
||||||
BMessage * message)
|
BMessage * message)
|
||||||
{
|
{
|
||||||
@@ -559,6 +567,10 @@ virtual void AllAttached()
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
BStringView * mTitle;
|
||||||
|
BStringView * mDetail;
|
||||||
|
BStringView * mBasedOn;
|
||||||
|
BStringView * mCopyright;
|
||||||
BPopUpMenu * mMenu;
|
BPopUpMenu * mMenu;
|
||||||
BMenuField * mField;
|
BMenuField * mField;
|
||||||
BCheckBox * mAscii;
|
BCheckBox * mAscii;
|
||||||
@@ -604,8 +616,9 @@ MakeConfig( /* optional */
|
|||||||
BView * * outView,
|
BView * * outView,
|
||||||
BRect * outExtent)
|
BRect * outExtent)
|
||||||
{
|
{
|
||||||
PPMView * v = new PPMView(BRect(0,0,225,175), "PPMTranslator Settings", B_FOLLOW_ALL, B_WILL_DRAW);
|
PPMView * v = new PPMView("PPMTranslator Settings", B_WILL_DRAW);
|
||||||
*outView = v;
|
*outView = v;
|
||||||
|
v->ResizeTo(v->ExplicitPreferredSize());;
|
||||||
*outExtent = v->Bounds();
|
*outExtent = v->Bounds();
|
||||||
if (ioExtension) {
|
if (ioExtension) {
|
||||||
v->SetSettings(ioExtension);
|
v->SetSettings(ioExtension);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
* Copyright 2005-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||||
|
* Copyright 2009, Maxime Simon, maxime.simon@gmail.com. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -9,54 +10,56 @@
|
|||||||
|
|
||||||
#include <StringView.h>
|
#include <StringView.h>
|
||||||
#include <CheckBox.h>
|
#include <CheckBox.h>
|
||||||
|
#include <GroupLayout.h>
|
||||||
|
#include <GroupLayoutBuilder.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags)
|
ConfigView::ConfigView(uint32 flags)
|
||||||
: BView(frame, "RAWTranslator Settings", resize, flags)
|
: BView("RAWTranslator Settings", flags)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
|
||||||
font_height fontHeight;
|
BStringView *fTitle = new BStringView("title", "RAW Images");
|
||||||
be_bold_font->GetHeight(&fontHeight);
|
fTitle->SetFont(be_bold_font);
|
||||||
float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading;
|
|
||||||
|
|
||||||
BRect rect(10, 10, 200, 10 + height);
|
|
||||||
BStringView *stringView = new BStringView(rect, "title", "RAW images");
|
|
||||||
stringView->SetFont(be_bold_font);
|
|
||||||
stringView->ResizeToPreferred();
|
|
||||||
AddChild(stringView);
|
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 10);
|
|
||||||
char version[256];
|
char version[256];
|
||||||
sprintf(version, "Version %d.%d.%d, %s",
|
sprintf(version, "Version %d.%d.%d, %s",
|
||||||
int(B_TRANSLATION_MAJOR_VERSION(RAW_TRANSLATOR_VERSION)),
|
int(B_TRANSLATION_MAJOR_VERSION(RAW_TRANSLATOR_VERSION)),
|
||||||
int(B_TRANSLATION_MINOR_VERSION(RAW_TRANSLATOR_VERSION)),
|
int(B_TRANSLATION_MINOR_VERSION(RAW_TRANSLATOR_VERSION)),
|
||||||
int(B_TRANSLATION_REVISION_VERSION(RAW_TRANSLATOR_VERSION)),
|
int(B_TRANSLATION_REVISION_VERSION(RAW_TRANSLATOR_VERSION)),
|
||||||
__DATE__);
|
__DATE__);
|
||||||
stringView = new BStringView(rect, "version", version);
|
BStringView *fVersion = new BStringView("version", version);
|
||||||
stringView->ResizeToPreferred();
|
|
||||||
AddChild(stringView);
|
|
||||||
|
|
||||||
GetFontHeight(&fontHeight);
|
BStringView *fCopyright = new BStringView("copyright",
|
||||||
height = fontHeight.descent + fontHeight.ascent + fontHeight.leading;
|
B_UTF8_COPYRIGHT "2007-2009 Haiku Inc.");
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 5);
|
BStringView *fCopyright2 = new BStringView("copyright2",
|
||||||
stringView = new BStringView(rect, "copyright", B_UTF8_COPYRIGHT "2007 Haiku Inc.");
|
"Based on Dave Coffin's dcraw 8.63");
|
||||||
stringView->ResizeToPreferred();
|
|
||||||
AddChild(stringView);
|
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 10);
|
BStringView *fCopyright3 = new BStringView("copyright3",
|
||||||
stringView = new BStringView(rect, "copyright2", "Based on Dave Coffin's dcraw 8.63");
|
B_UTF8_COPYRIGHT "1997-2007 Dave Coffin");
|
||||||
stringView->ResizeToPreferred();
|
|
||||||
AddChild(stringView);
|
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 5);
|
// Build the layout
|
||||||
stringView = new BStringView(rect, "copyright3", B_UTF8_COPYRIGHT "1997-2007 Dave Coffin");
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
stringView->ResizeToPreferred();
|
|
||||||
AddChild(stringView);
|
AddChild(BGroupLayoutBuilder(B_VERTICAL, 7)
|
||||||
|
.Add(fTitle)
|
||||||
|
.AddGlue()
|
||||||
|
.Add(fVersion)
|
||||||
|
.Add(fCopyright)
|
||||||
|
.AddGlue()
|
||||||
|
.Add(fCopyright2)
|
||||||
|
.Add(fCopyright3)
|
||||||
|
.AddGlue()
|
||||||
|
.SetInsets(5, 5, 5, 5)
|
||||||
|
);
|
||||||
|
|
||||||
|
BFont font;
|
||||||
|
GetFont(&font);
|
||||||
|
SetExplicitPreferredSize(BSize((font.Size() * 233)/12, (font.Size() * 200)/12));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
class ConfigView : public BView {
|
class ConfigView : public BView {
|
||||||
public:
|
public:
|
||||||
ConfigView(const BRect &frame, uint32 resize = B_FOLLOW_ALL,
|
ConfigView(uint32 flags = B_WILL_DRAW);
|
||||||
uint32 flags = B_WILL_DRAW);
|
|
||||||
virtual ~ConfigView();
|
virtual ~ConfigView();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ RAWTranslator::DerivedTranslate(BPositionIO* stream,
|
|||||||
BView *
|
BView *
|
||||||
RAWTranslator::NewConfigView(TranslatorSettings *settings)
|
RAWTranslator::NewConfigView(TranslatorSettings *settings)
|
||||||
{
|
{
|
||||||
return new ConfigView(BRect(0, 0, 225, 175));
|
return new ConfigView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#if SHOW_MODE && TEST_MODE
|
#if SHOW_MODE && TEST_MODE
|
||||||
# include <Bitmap.h>
|
# include <Bitmap.h>
|
||||||
# include <BitmapStream.h>
|
# include <BitmapStream.h>
|
||||||
|
# include <GroupLayout.h>
|
||||||
# include <String.h>
|
# include <String.h>
|
||||||
# include <View.h>
|
# include <View.h>
|
||||||
# include <Window.h>
|
# include <Window.h>
|
||||||
@@ -114,14 +115,13 @@ main(int argc, char **argv)
|
|||||||
if (status == B_OK)
|
if (status == B_OK)
|
||||||
status = output.DetachBitmap(&bitmap);
|
status = output.DetachBitmap(&bitmap);
|
||||||
if (status == B_OK) {
|
if (status == B_OK) {
|
||||||
BWindow* window = new BWindow(BRect(50, 50,
|
BWindow* window = new BWindow(BRect(0, 0, 1, 1),
|
||||||
bitmap->Bounds().Width() + 50,
|
|
||||||
bitmap->Bounds().Height() + 50),
|
|
||||||
"RAW", B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS
|
"RAW", B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS
|
||||||
| B_NOT_RESIZABLE);
|
| B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS);
|
||||||
BView* view = new BView(window->Bounds(), NULL,
|
BView* view = new BView(window->Bounds(), NULL,
|
||||||
B_WILL_DRAW, B_FOLLOW_NONE);
|
B_WILL_DRAW, B_FOLLOW_NONE);
|
||||||
window->AddChild(view);
|
window->AddChild(view);
|
||||||
|
window->SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
window->Show();
|
window->Show();
|
||||||
snooze(300000);
|
snooze(300000);
|
||||||
window->Lock();
|
window->Lock();
|
||||||
@@ -140,8 +140,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
status_t status = LaunchTranslatorWindow(new RAWTranslator, "RAW Settings",
|
status_t status = LaunchTranslatorWindow(new RAWTranslator, "RAW Settings");
|
||||||
BRect(0, 0, 225, 175));
|
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|||||||
@@ -642,8 +642,12 @@ BaseTranslator::MakeConfigurationView(BMessage *ioExtension, BView **outView,
|
|||||||
|
|
||||||
BView *view = NewConfigView(AcquireSettings());
|
BView *view = NewConfigView(AcquireSettings());
|
||||||
// implemented in derived class
|
// implemented in derived class
|
||||||
|
|
||||||
if (view) {
|
if (view) {
|
||||||
*outView = view;
|
*outView = view;
|
||||||
|
if ((view->Flags() & B_SUPPORTS_LAYOUT) != 0)
|
||||||
|
view->ResizeTo(view->ExplicitPreferredSize());
|
||||||
|
|
||||||
*outExtent = view->Bounds();
|
*outExtent = view->Bounds();
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
|
#include <GroupLayout.h>
|
||||||
#include "TranslatorWindow.h"
|
#include "TranslatorWindow.h"
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
@@ -48,8 +49,11 @@
|
|||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
TranslatorWindow::TranslatorWindow(BRect area, const char *title)
|
TranslatorWindow::TranslatorWindow(BRect area, const char *title)
|
||||||
: BWindow(area, title, B_TITLED_WINDOW,
|
: BWindow(area, title, B_TITLED_WINDOW,
|
||||||
B_NOT_RESIZABLE | B_NOT_ZOOMABLE)
|
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
|
||||||
{
|
{
|
||||||
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
|
// Set the layout on layout window
|
||||||
|
// Do nothing for a non-layout window
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
@@ -85,7 +89,6 @@ LaunchTranslatorWindow(BTranslator *translator, const char *title, BRect rect)
|
|||||||
translator = NULL;
|
translator = NULL;
|
||||||
|
|
||||||
TranslatorWindow *wnd = new TranslatorWindow(rect, title);
|
TranslatorWindow *wnd = new TranslatorWindow(rect, title);
|
||||||
view->ResizeTo(rect.Width(), rect.Height());
|
|
||||||
wnd->AddChild(view);
|
wnd->AddChild(view);
|
||||||
BPoint wndpt = B_ORIGIN;
|
BPoint wndpt = B_ORIGIN;
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
LaunchTranslatorWindow(BTranslator *translator, const char *title, BRect rect);
|
LaunchTranslatorWindow(BTranslator *translator, const char *title,
|
||||||
|
BRect rect = BRect(0, 0, 1, 1));
|
||||||
|
|
||||||
#endif // #ifndef TRANSLATORWINDOW_H
|
#endif // #ifndef TRANSLATORWINDOW_H
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,7 @@ main()
|
|||||||
{
|
{
|
||||||
BApplication app("application/x-vnd.Haiku-TGATranslator");
|
BApplication app("application/x-vnd.Haiku-TGATranslator");
|
||||||
status_t result;
|
status_t result;
|
||||||
result = LaunchTranslatorWindow(new TGATranslator,
|
result = LaunchTranslatorWindow(new TGATranslator, "TGA Settings");
|
||||||
"TGA Settings", BRect(0, 0, 225, 175));
|
|
||||||
if (result == B_OK) {
|
if (result == B_OK) {
|
||||||
app.Run();
|
app.Run();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -2188,7 +2188,6 @@ TGATranslator::DerivedTranslate(BPositionIO *inSource,
|
|||||||
BView *
|
BView *
|
||||||
TGATranslator::NewConfigView(TranslatorSettings *settings)
|
TGATranslator::NewConfigView(TranslatorSettings *settings)
|
||||||
{
|
{
|
||||||
return new TGAView(BRect(0, 0, 225, 175), "TGATranslator Settings",
|
return new TGAView("TGATranslator Settings", B_WILL_DRAW, settings);
|
||||||
B_FOLLOW_ALL, B_WILL_DRAW, settings);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// TGAView
|
// TGAView
|
||||||
// Written by Michael Wilber, OBOS Translation Kit Team
|
// Written by Michael Wilber, OBOS Translation Kit Team
|
||||||
|
// Use of Layout API added by Maxime Simon, [email protected], 2009.
|
||||||
//
|
//
|
||||||
// TGAView.cpp
|
// TGAView.cpp
|
||||||
//
|
//
|
||||||
@@ -28,6 +29,10 @@
|
|||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include <GroupLayout.h>
|
||||||
|
#include <GroupLayoutBuilder.h>
|
||||||
|
#include <SpaceLayoutItem.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -36,32 +41,57 @@
|
|||||||
#include "TGATranslator.h"
|
#include "TGATranslator.h"
|
||||||
|
|
||||||
|
|
||||||
TGAView::TGAView(const BRect& frame, const char* name, uint32 resize,
|
TGAView::TGAView(const char *name, uint32 flags, TranslatorSettings *settings)
|
||||||
uint32 flags, TranslatorSettings* settings)
|
|
||||||
:
|
:
|
||||||
BView(frame, name, resize, flags),
|
BView(name, flags),
|
||||||
fSettings(settings)
|
fSettings(settings)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
SetLowColor(ViewColor());
|
SetLowColor(ViewColor());
|
||||||
|
|
||||||
fpchkIgnoreAlpha = new BCheckBox(BRect(10, 45, 180, 62),
|
fTitle = new BStringView("title", "TGA Image Translator");
|
||||||
"Ignore TGA alpha channel", "Ignore TGA alpha channel",
|
fTitle->SetFont(be_bold_font);
|
||||||
|
|
||||||
|
char detail[100];
|
||||||
|
sprintf(detail, "Version %d.%d.%d %s",
|
||||||
|
static_cast<int>(B_TRANSLATION_MAJOR_VERSION(TGA_TRANSLATOR_VERSION)),
|
||||||
|
static_cast<int>(B_TRANSLATION_MINOR_VERSION(TGA_TRANSLATOR_VERSION)),
|
||||||
|
static_cast<int>(B_TRANSLATION_REVISION_VERSION(TGA_TRANSLATOR_VERSION)),
|
||||||
|
__DATE__);
|
||||||
|
fDetail = new BStringView("detail", detail);
|
||||||
|
fWrittenBy = new BStringView("writtenby",
|
||||||
|
"Written by the Haiku Translation Kit Team");
|
||||||
|
|
||||||
|
fpchkIgnoreAlpha = new BCheckBox("Ignore TGA alpha channel",
|
||||||
new BMessage(CHANGE_IGNORE_ALPHA));
|
new BMessage(CHANGE_IGNORE_ALPHA));
|
||||||
int32 val = (fSettings->SetGetBool(TGA_SETTING_IGNORE_ALPHA)) ? 1 : 0;
|
int32 val = (fSettings->SetGetBool(TGA_SETTING_IGNORE_ALPHA)) ? 1 : 0;
|
||||||
fpchkIgnoreAlpha->SetValue(val);
|
fpchkIgnoreAlpha->SetValue(val);
|
||||||
fpchkIgnoreAlpha->SetViewColor(ViewColor());
|
fpchkIgnoreAlpha->SetViewColor(ViewColor());
|
||||||
AddChild(fpchkIgnoreAlpha);
|
|
||||||
fpchkIgnoreAlpha->ResizeToPreferred();
|
fpchkRLE = new BCheckBox("Save with RLE Compression",
|
||||||
|
|
||||||
fpchkRLE = new BCheckBox(BRect(10, 67, 180, 84),
|
|
||||||
"Save with RLE compression", "Save with RLE compression",
|
|
||||||
new BMessage(CHANGE_RLE));
|
new BMessage(CHANGE_RLE));
|
||||||
val = (fSettings->SetGetBool(TGA_SETTING_RLE)) ? 1 : 0;
|
val = (fSettings->SetGetBool(TGA_SETTING_RLE)) ? 1 : 0;
|
||||||
fpchkRLE->SetValue(val);
|
fpchkRLE->SetValue(val);
|
||||||
fpchkRLE->SetViewColor(ViewColor());
|
fpchkRLE->SetViewColor(ViewColor());
|
||||||
AddChild(fpchkRLE);
|
|
||||||
fpchkRLE->ResizeToPreferred();
|
// Build the layout
|
||||||
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
|
|
||||||
|
AddChild(BGroupLayoutBuilder(B_VERTICAL, 7)
|
||||||
|
.Add(fTitle)
|
||||||
|
.Add(fDetail)
|
||||||
|
.AddGlue()
|
||||||
|
.Add(fpchkIgnoreAlpha)
|
||||||
|
.Add(fpchkRLE)
|
||||||
|
.AddGlue()
|
||||||
|
.Add(fWrittenBy)
|
||||||
|
.AddGlue()
|
||||||
|
.SetInsets(5, 5, 5, 5)
|
||||||
|
);
|
||||||
|
|
||||||
|
BFont font;
|
||||||
|
GetFont(&font);
|
||||||
|
SetExplicitPreferredSize(BSize((font.Size() * 333)/12, (font.Size() * 200)/12));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -103,33 +133,3 @@ TGAView::MessageReceived(BMessage* message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
TGAView::Draw(BRect area)
|
|
||||||
{
|
|
||||||
SetFont(be_bold_font);
|
|
||||||
font_height fh;
|
|
||||||
GetFontHeight(&fh);
|
|
||||||
float xbold, ybold;
|
|
||||||
xbold = fh.descent + 1;
|
|
||||||
ybold = fh.ascent + fh.descent * 2 + fh.leading;
|
|
||||||
|
|
||||||
DrawString("TGA image translator", BPoint(xbold, ybold));
|
|
||||||
|
|
||||||
SetFont(be_plain_font);
|
|
||||||
font_height plainh;
|
|
||||||
GetFontHeight(&plainh);
|
|
||||||
float yplain;
|
|
||||||
yplain = plainh.ascent + plainh.descent * 2 + plainh.leading;
|
|
||||||
|
|
||||||
char detail[100];
|
|
||||||
sprintf(detail, "Version %d.%d.%d %s",
|
|
||||||
static_cast<int>(B_TRANSLATION_MAJOR_VERSION(TGA_TRANSLATOR_VERSION)),
|
|
||||||
static_cast<int>(B_TRANSLATION_MINOR_VERSION(TGA_TRANSLATOR_VERSION)),
|
|
||||||
static_cast<int>(B_TRANSLATION_REVISION_VERSION(TGA_TRANSLATOR_VERSION)),
|
|
||||||
__DATE__);
|
|
||||||
DrawString(detail, BPoint(xbold, yplain + ybold));
|
|
||||||
|
|
||||||
DrawString("Written by the Haiku Translation Kit team",
|
|
||||||
BPoint(xbold, yplain * 7 + ybold));
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -33,12 +33,12 @@
|
|||||||
|
|
||||||
#include <View.h>
|
#include <View.h>
|
||||||
#include <CheckBox.h>
|
#include <CheckBox.h>
|
||||||
|
#include <StringView.h>
|
||||||
#include "TranslatorSettings.h"
|
#include "TranslatorSettings.h"
|
||||||
|
|
||||||
class TGAView : public BView {
|
class TGAView : public BView {
|
||||||
public:
|
public:
|
||||||
TGAView(const BRect &frame, const char *name, uint32 resize,
|
TGAView(const char *name, uint32 flags, TranslatorSettings *settings);
|
||||||
uint32 flags, TranslatorSettings *settings);
|
|
||||||
// sets up the view
|
// sets up the view
|
||||||
|
|
||||||
~TGAView();
|
~TGAView();
|
||||||
@@ -46,12 +46,12 @@ public:
|
|||||||
|
|
||||||
virtual void AllAttached();
|
virtual void AllAttached();
|
||||||
virtual void MessageReceived(BMessage *message);
|
virtual void MessageReceived(BMessage *message);
|
||||||
|
|
||||||
virtual void Draw(BRect area);
|
|
||||||
// draws information about the TGATranslator
|
|
||||||
|
|
||||||
enum { CHANGE_RLE, CHANGE_IGNORE_ALPHA };
|
enum { CHANGE_RLE, CHANGE_IGNORE_ALPHA };
|
||||||
private:
|
private:
|
||||||
|
BStringView *fTitle;
|
||||||
|
BStringView *fDetail;
|
||||||
|
BStringView *fWrittenBy;
|
||||||
BCheckBox *fpchkIgnoreAlpha;
|
BCheckBox *fpchkIgnoreAlpha;
|
||||||
BCheckBox *fpchkRLE;
|
BCheckBox *fpchkRLE;
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,7 @@ main()
|
|||||||
{
|
{
|
||||||
BApplication app("application/x-vnd.Haiku-TIFFTranslator");
|
BApplication app("application/x-vnd.Haiku-TIFFTranslator");
|
||||||
status_t result;
|
status_t result;
|
||||||
result = LaunchTranslatorWindow(new TIFFTranslator,
|
result = LaunchTranslatorWindow(new TIFFTranslator, "TIFF Settings");
|
||||||
"TIFF Settings", BRect(0, 0, 225, 175));
|
|
||||||
if (result == B_OK) {
|
if (result == B_OK) {
|
||||||
app.Run();
|
app.Run();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -945,6 +945,5 @@ TIFFTranslator::DerivedTranslate(BPositionIO *inSource,
|
|||||||
BView *
|
BView *
|
||||||
TIFFTranslator::NewConfigView(TranslatorSettings *settings)
|
TIFFTranslator::NewConfigView(TranslatorSettings *settings)
|
||||||
{
|
{
|
||||||
return new TIFFView(BRect(0, 0, 225, 175), "TIFFTranslator Settings",
|
return new TIFFView("TIFFTranslator Settings", B_WILL_DRAW, settings);
|
||||||
B_FOLLOW_ALL, B_WILL_DRAW, settings);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// TIFFView
|
// TIFFView
|
||||||
// Written by Michael Wilber, OBOS Translation Kit Team
|
// Written by Michael Wilber, OBOS Translation Kit Team
|
||||||
// Picking the compression method added by Stephan Aßmus, <[email protected]>
|
// Picking the compression method added by Stephan Aßmus, <[email protected]>
|
||||||
|
// Use of Layout API added by Maxime Simon, [email protected], 2009.
|
||||||
//
|
//
|
||||||
// TIFFView.cpp
|
// TIFFView.cpp
|
||||||
//
|
//
|
||||||
@@ -32,6 +33,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <GridLayoutBuilder.h>
|
||||||
|
#include <GroupLayout.h>
|
||||||
|
#include <GroupLayoutBuilder.h>
|
||||||
#include <MenuBar.h>
|
#include <MenuBar.h>
|
||||||
#include <MenuField.h>
|
#include <MenuField.h>
|
||||||
#include <MenuItem.h>
|
#include <MenuItem.h>
|
||||||
@@ -73,15 +77,35 @@ add_menu_item(BMenu* menu,
|
|||||||
//
|
//
|
||||||
// Returns:
|
// Returns:
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
TIFFView::TIFFView(const BRect &frame, const char *name,
|
TIFFView::TIFFView(const char *name, uint32 flags, TranslatorSettings *settings)
|
||||||
uint32 resize, uint32 flags, TranslatorSettings *settings)
|
: BView(name, flags)
|
||||||
: BView(frame, name, resize, flags)
|
|
||||||
{
|
{
|
||||||
fSettings = settings;
|
fSettings = settings;
|
||||||
|
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
SetLowColor(ViewColor());
|
SetLowColor(ViewColor());
|
||||||
|
|
||||||
|
fTitle = new BStringView("title", "TIFF Image Translator");
|
||||||
|
fTitle->SetFont(be_bold_font);
|
||||||
|
|
||||||
|
char detail[100];
|
||||||
|
sprintf(detail, "Version %d.%d.%d %s",
|
||||||
|
static_cast<int>(B_TRANSLATION_MAJOR_VERSION(TIFF_TRANSLATOR_VERSION)),
|
||||||
|
static_cast<int>(B_TRANSLATION_MINOR_VERSION(TIFF_TRANSLATOR_VERSION)),
|
||||||
|
static_cast<int>(B_TRANSLATION_REVISION_VERSION(TIFF_TRANSLATOR_VERSION)),
|
||||||
|
__DATE__);
|
||||||
|
fDetail = new BStringView("detail", detail);
|
||||||
|
|
||||||
|
int16 i = 1;
|
||||||
|
fLibTIFF[0] = new BStringView(NULL, "TIFF Library:");
|
||||||
|
char libtiff[] = TIFFLIB_VERSION_STR;
|
||||||
|
char *tok = strtok(libtiff, "\n");
|
||||||
|
while (i < 5 && tok) {
|
||||||
|
fLibTIFF[i] = new BStringView(NULL, tok);
|
||||||
|
tok = strtok(NULL, "\n");
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
BPopUpMenu* menu = new BPopUpMenu("pick compression");
|
BPopUpMenu* menu = new BPopUpMenu("pick compression");
|
||||||
|
|
||||||
uint32 currentCompression = fSettings->SetGetInt32(TIFF_SETTING_COMPRESSION);
|
uint32 currentCompression = fSettings->SetGetInt32(TIFF_SETTING_COMPRESSION);
|
||||||
@@ -98,13 +122,31 @@ TIFFView::TIFFView(const BRect &frame, const char *name,
|
|||||||
// TODO ? - strip encoding is not implemented in libTIFF for this compression
|
// TODO ? - strip encoding is not implemented in libTIFF for this compression
|
||||||
// add_menu_item(menu, COMPRESSION_JP2000, "JPEG2000", currentCompression);
|
// add_menu_item(menu, COMPRESSION_JP2000, "JPEG2000", currentCompression);
|
||||||
|
|
||||||
fCompressionMF = new BMenuField(BRect(20, 50, 215, 70), "compression",
|
fCompressionMF = new BMenuField("Use Compression:", menu, NULL);
|
||||||
"Use compression:", menu, true);
|
|
||||||
fCompressionMF->ResizeToPreferred();
|
// Build the layout
|
||||||
fCompressionMF->SetDivider(
|
SetLayout(new BGroupLayout(B_VERTICAL));
|
||||||
fCompressionMF->StringWidth(fCompressionMF->Label()) + 7);
|
|
||||||
AddChild(fCompressionMF);
|
i = 0;
|
||||||
|
AddChild(BGroupLayoutBuilder(B_VERTICAL, 7)
|
||||||
|
.Add(fTitle)
|
||||||
|
.Add(fDetail)
|
||||||
|
.AddGlue()
|
||||||
|
.Add(fCompressionMF)
|
||||||
|
.AddGlue()
|
||||||
|
.Add(fLibTIFF[0])
|
||||||
|
.Add(fLibTIFF[1])
|
||||||
|
.Add(fLibTIFF[2])
|
||||||
|
.Add(fLibTIFF[3])
|
||||||
|
// Theses 4 adding above work because we know there are 4 strings
|
||||||
|
// but it's fragile: one string less in the library version and the application breaks
|
||||||
|
.AddGlue()
|
||||||
|
.SetInsets(5, 5, 5, 5)
|
||||||
|
);
|
||||||
|
|
||||||
|
BFont font;
|
||||||
|
GetFont(&font);
|
||||||
|
SetExplicitPreferredSize(BSize((font.Size() * 350)/12, (font.Size() * 200)/12));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
@@ -148,7 +190,6 @@ TIFFView::MessageReceived(BMessage* message)
|
|||||||
fSettings->SetGetInt32(TIFF_SETTING_COMPRESSION, &value);
|
fSettings->SetGetInt32(TIFF_SETTING_COMPRESSION, &value);
|
||||||
fSettings->SaveSettings();
|
fSettings->SaveSettings();
|
||||||
}
|
}
|
||||||
fCompressionMF->ResizeToPreferred();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@@ -178,55 +219,3 @@ TIFFView::AllAttached()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
|
||||||
// Draw
|
|
||||||
//
|
|
||||||
// Draws information about the TIFFTranslator to this view.
|
|
||||||
//
|
|
||||||
// Preconditions:
|
|
||||||
//
|
|
||||||
// Parameters: area, not used
|
|
||||||
//
|
|
||||||
// Postconditions:
|
|
||||||
//
|
|
||||||
// Returns:
|
|
||||||
// ---------------------------------------------------------------
|
|
||||||
void
|
|
||||||
TIFFView::Draw(BRect area)
|
|
||||||
{
|
|
||||||
SetFont(be_bold_font);
|
|
||||||
font_height fh;
|
|
||||||
GetFontHeight(&fh);
|
|
||||||
float xbold, ybold;
|
|
||||||
xbold = fh.descent + 1;
|
|
||||||
ybold = fh.ascent + fh.descent * 2 + fh.leading;
|
|
||||||
|
|
||||||
char title[] = "TIFF image translator";
|
|
||||||
DrawString(title, BPoint(xbold, ybold));
|
|
||||||
|
|
||||||
SetFont(be_plain_font);
|
|
||||||
font_height plainh;
|
|
||||||
GetFontHeight(&plainh);
|
|
||||||
float yplain;
|
|
||||||
yplain = plainh.ascent + plainh.descent * 2 + plainh.leading;
|
|
||||||
|
|
||||||
char detail[100];
|
|
||||||
sprintf(detail, "Version %d.%d.%d %s",
|
|
||||||
static_cast<int>(B_TRANSLATION_MAJOR_VERSION(TIFF_TRANSLATOR_VERSION)),
|
|
||||||
static_cast<int>(B_TRANSLATION_MINOR_VERSION(TIFF_TRANSLATOR_VERSION)),
|
|
||||||
static_cast<int>(B_TRANSLATION_REVISION_VERSION(TIFF_TRANSLATOR_VERSION)),
|
|
||||||
__DATE__);
|
|
||||||
DrawString(detail, BPoint(xbold, yplain + ybold));
|
|
||||||
|
|
||||||
int32 lineno = 6;
|
|
||||||
DrawString("TIFF library:", BPoint(xbold, yplain * lineno + ybold));
|
|
||||||
lineno += 2;
|
|
||||||
|
|
||||||
char libtiff[] = TIFFLIB_VERSION_STR;
|
|
||||||
char *tok = strtok(libtiff, "\n");
|
|
||||||
while (tok) {
|
|
||||||
DrawString(tok, BPoint(xbold, yplain * lineno + ybold));
|
|
||||||
lineno++;
|
|
||||||
tok = strtok(NULL, "\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -34,12 +34,12 @@
|
|||||||
|
|
||||||
#include <View.h>
|
#include <View.h>
|
||||||
#include <MenuField.h>
|
#include <MenuField.h>
|
||||||
|
#include <StringView.h>
|
||||||
#include "TranslatorSettings.h"
|
#include "TranslatorSettings.h"
|
||||||
|
|
||||||
class TIFFView : public BView {
|
class TIFFView : public BView {
|
||||||
public:
|
public:
|
||||||
TIFFView(const BRect &frame, const char *name, uint32 resize,
|
TIFFView(const char *name, uint32 flags, TranslatorSettings *settings);
|
||||||
uint32 flags, TranslatorSettings *settings);
|
|
||||||
// sets up the view
|
// sets up the view
|
||||||
|
|
||||||
~TIFFView();
|
~TIFFView();
|
||||||
@@ -48,14 +48,14 @@ public:
|
|||||||
virtual void AllAttached();
|
virtual void AllAttached();
|
||||||
virtual void MessageReceived(BMessage *message);
|
virtual void MessageReceived(BMessage *message);
|
||||||
|
|
||||||
virtual void Draw(BRect area);
|
|
||||||
// draws information about the TIFFTranslator
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
MSG_COMPRESSION_CHANGED = 'cmch',
|
MSG_COMPRESSION_CHANGED = 'cmch',
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
BStringView* fTitle;
|
||||||
|
BStringView* fDetail;
|
||||||
|
BStringView* fLibTIFF[5];
|
||||||
BMenuField* fCompressionMF;
|
BMenuField* fCompressionMF;
|
||||||
|
|
||||||
TranslatorSettings *fSettings;
|
TranslatorSettings *fSettings;
|
||||||
|
|||||||
Reference in New Issue
Block a user