Automatic whitespace cleanup. No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39102 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
707466cad1
commit
19ae515e43
@ -5,7 +5,7 @@
|
||||
// ActiveTranslatorsWindow.cpp
|
||||
//
|
||||
// BWindow class for displaying information about the currently open
|
||||
// document
|
||||
// document
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2003 OpenBeOS Project
|
||||
@ -13,18 +13,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
@ -53,7 +53,7 @@ ActiveTranslatorsWindow::ActiveTranslatorsWindow(BRect rect, const char *name,
|
||||
{
|
||||
BRect rctframe = Bounds();
|
||||
rctframe.right -= B_V_SCROLL_BAR_WIDTH;
|
||||
|
||||
|
||||
fpListView = new BOutlineListView(rctframe, "translators_list",
|
||||
B_MULTIPLE_SELECTION_LIST);
|
||||
|
||||
@ -63,12 +63,12 @@ ActiveTranslatorsWindow::ActiveTranslatorsWindow(BRect rect, const char *name,
|
||||
fpSystemItem->SetEnabled(false);
|
||||
AddTranslatorsToList(plist, USER_TRANSLATOR, fpUserItem);
|
||||
AddTranslatorsToList(plist, SYSTEM_TRANSLATOR, fpSystemItem);
|
||||
|
||||
|
||||
AddChild(new BScrollView("scroll_list", fpListView, B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||
0, false, true));
|
||||
|
||||
|
||||
SetSizeLimits(100, 10000, 100, 10000);
|
||||
|
||||
|
||||
Show();
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
// ActiveTranslatorsWindow.h
|
||||
//
|
||||
// BWindow class for displaying information about the currently open
|
||||
// document
|
||||
// document
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2003 OpenBeOS Project
|
||||
@ -13,18 +13,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
@ -43,10 +43,10 @@ public:
|
||||
void FrameResized(float width, float height);
|
||||
void MessageReceived(BMessage *pmsg);
|
||||
void Quit();
|
||||
|
||||
|
||||
private:
|
||||
void AddTranslatorsToList(BList *plist, int32 group, BStringItem *pparent);
|
||||
|
||||
|
||||
BOutlineListView *fpListView;
|
||||
BStringItem *fpUserItem;
|
||||
BStringItem *fpSystemItem;
|
||||
|
@ -12,18 +12,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
|
@ -14,18 +14,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
@ -70,7 +70,7 @@ ImageView::ImageView(BRect rect, const char *name)
|
||||
fpbitmap = NULL;
|
||||
fdocumentIndex = 1;
|
||||
fdocumentCount = 1;
|
||||
|
||||
|
||||
SetViewColor(192, 192, 192);
|
||||
SetHighColor(0, 0, 0);
|
||||
SetPenSize(PEN_SIZE);
|
||||
@ -101,7 +101,7 @@ ImageView::Draw(BRect rect)
|
||||
BORDER_HEIGHT - PEN_SIZE,
|
||||
fpbitmap->Bounds().Width() + BORDER_WIDTH + PEN_SIZE,
|
||||
fpbitmap->Bounds().Height() + BORDER_HEIGHT + PEN_SIZE));
|
||||
|
||||
|
||||
DrawBitmap(fpbitmap, BPoint(BORDER_WIDTH, BORDER_HEIGHT));
|
||||
}
|
||||
}
|
||||
@ -129,7 +129,7 @@ ImageView::MouseDown(BPoint point)
|
||||
{
|
||||
if (!HasImage())
|
||||
return;
|
||||
|
||||
|
||||
// Only accept left button clicks
|
||||
BMessage *pmsg = Window()->CurrentMessage();
|
||||
int32 button = pmsg->FindInt32("buttons");
|
||||
@ -170,7 +170,7 @@ ImageView::MessageReceived(BMessage *pmsg)
|
||||
case B_COPY_TARGET:
|
||||
SaveImageAtDropLocation(pmsg);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
BView::MessageReceived(pmsg);
|
||||
break;
|
||||
@ -184,9 +184,9 @@ ImageView::SaveImageAtDropLocation(BMessage *pmsg)
|
||||
// Find the location and name of the drop and
|
||||
// write the image file there
|
||||
BBitmapStream stream(fpbitmap);
|
||||
|
||||
|
||||
StatusCheck chk;
|
||||
// throw an exception if this is assigned
|
||||
// throw an exception if this is assigned
|
||||
// anything other than B_OK
|
||||
|
||||
try {
|
||||
@ -194,21 +194,21 @@ ImageView::SaveImageAtDropLocation(BMessage *pmsg)
|
||||
chk = pmsg->FindRef("directory", &dirref);
|
||||
const char *filename;
|
||||
chk = pmsg->FindString("name", &filename);
|
||||
|
||||
|
||||
BDirectory dir(&dirref);
|
||||
BFile file(&dir, filename, B_WRITE_ONLY | B_CREATE_FILE);
|
||||
chk = file.InitCheck();
|
||||
|
||||
|
||||
BTranslatorRoster *proster = BTranslatorRoster::Default();
|
||||
chk = proster->Translate(&stream, NULL, NULL, &file, B_TGA_FORMAT);
|
||||
|
||||
} catch (StatusNotOKException) {
|
||||
BAlert *palert = new BAlert(NULL,
|
||||
B_TRANSLATE("Sorry, unable to write the image file."),
|
||||
B_TRANSLATE("Sorry, unable to write the image file."),
|
||||
B_TRANSLATE("OK"));
|
||||
palert->Go();
|
||||
}
|
||||
|
||||
|
||||
stream.DetachBitmap(&fpbitmap);
|
||||
}
|
||||
|
||||
@ -219,7 +219,7 @@ ImageView::AdjustScrollBars()
|
||||
BRect rctview = Bounds(), rctbitmap(0, 0, 0, 0);
|
||||
if (HasImage())
|
||||
rctbitmap = fpbitmap->Bounds();
|
||||
|
||||
|
||||
float prop, range;
|
||||
BScrollBar *psb = ScrollBar(B_HORIZONTAL);
|
||||
if (psb) {
|
||||
@ -231,7 +231,7 @@ ImageView::AdjustScrollBars()
|
||||
psb->SetProportion(prop);
|
||||
psb->SetSteps(10, 100);
|
||||
}
|
||||
|
||||
|
||||
psb = ScrollBar(B_VERTICAL);
|
||||
if (psb) {
|
||||
range = rctbitmap.Height() + (BORDER_HEIGHT * 2) - rctview.Height();
|
||||
@ -245,7 +245,7 @@ ImageView::AdjustScrollBars()
|
||||
}
|
||||
|
||||
|
||||
struct ColorSpaceName {
|
||||
struct ColorSpaceName {
|
||||
color_space id;
|
||||
const char *name;
|
||||
};
|
||||
@ -323,7 +323,7 @@ hex_format(uint32 num)
|
||||
{
|
||||
static char str[11] = { 0 };
|
||||
sprintf(str, "0x%.8lx", num);
|
||||
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ char_format(uint32 num)
|
||||
static char str[5] = { 0 };
|
||||
uint32 bnum = B_HOST_TO_BENDIAN_INT32(num);
|
||||
memcpy(str, &bnum, 4);
|
||||
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ ImageView::UpdateInfoWindow(const BPath &path, BMessage &ioExtension,
|
||||
str2[0] = '\0';
|
||||
sprintf(str2, "%f", tinfo.capability);
|
||||
bstr.ReplaceFirst("%16", str2);
|
||||
|
||||
|
||||
int32 document_count = 0, document_index = 0;
|
||||
// Translator Info
|
||||
const char *tranname = NULL, *traninfo = NULL;
|
||||
@ -468,7 +468,7 @@ ImageView::UpdateInfoWindow(const BPath &path, BMessage &ioExtension,
|
||||
bstr.Append(str.String());
|
||||
}
|
||||
else
|
||||
if (proster->GetTranslatorInfo(tinfo.translator, &tranname,
|
||||
if (proster->GetTranslatorInfo(tinfo.translator, &tranname,
|
||||
&traninfo, &tranversion) == B_OK) {
|
||||
BString str = B_TRANSLATE("\nTranslator Used:\n"
|
||||
"Name: %1\n"
|
||||
@ -520,7 +520,7 @@ ImageView::SelectTranslatorRoster(BTranslatorRoster &roster)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bNoneSelected)
|
||||
return BTranslatorRoster::Default();
|
||||
else
|
||||
@ -533,16 +533,16 @@ ImageView::SetImage(BMessage *pmsg)
|
||||
{
|
||||
// Replace current image with the image
|
||||
// specified in the given BMessage
|
||||
|
||||
|
||||
entry_ref ref;
|
||||
if (!pmsg)
|
||||
ref = fcurrentRef;
|
||||
else if (pmsg->FindRef("refs", &ref) != B_OK)
|
||||
// If refs not found, just ignore the message
|
||||
return;
|
||||
|
||||
|
||||
StatusCheck chk;
|
||||
|
||||
|
||||
try {
|
||||
BFile file(&ref, B_READ_ONLY);
|
||||
chk = file.InitCheck();
|
||||
@ -561,7 +561,7 @@ ImageView::SetImage(BMessage *pmsg)
|
||||
chk = ioExtension.AddInt32("/documentIndex", fdocumentIndex);
|
||||
chk = proster->Identify(&file, &ioExtension, &tinfo, 0, NULL,
|
||||
B_TRANSLATOR_BITMAP);
|
||||
|
||||
|
||||
// perform the actual translation
|
||||
BBitmapStream outstream;
|
||||
chk = proster->Translate(&file, &tinfo, &ioExtension, &outstream,
|
||||
@ -579,7 +579,7 @@ ImageView::SetImage(BMessage *pmsg)
|
||||
fdocumentCount = documentCount;
|
||||
else
|
||||
fdocumentCount = 1;
|
||||
|
||||
|
||||
// Set the name of the Window to reflect the file name
|
||||
BWindow *pwin = Window();
|
||||
BEntry entry(&ref);
|
||||
@ -593,7 +593,7 @@ ImageView::SetImage(BMessage *pmsg)
|
||||
pwin->SetTitle(IMAGEWINDOW_TITLE);
|
||||
UpdateInfoWindow(path, ioExtension, tinfo, proster);
|
||||
|
||||
// Resize parent window and set size limits to
|
||||
// Resize parent window and set size limits to
|
||||
// reflect the size of the new bitmap
|
||||
float width, height;
|
||||
BMenuBar *pbar = pwin->KeyMenuBar();
|
||||
@ -619,13 +619,13 @@ ImageView::SetImage(BMessage *pmsg)
|
||||
// HACK: Need to fix case where window un-zooms
|
||||
// when the window is already the correct size
|
||||
// for the current image
|
||||
|
||||
|
||||
// repaint view
|
||||
Invalidate();
|
||||
|
||||
} catch (StatusNotOKException) {
|
||||
BAlert *palert = new BAlert(NULL,
|
||||
B_TRANSLATE("Sorry, unable to load the image."),
|
||||
B_TRANSLATE("Sorry, unable to load the image."),
|
||||
B_TRANSLATE("OK"));
|
||||
palert->Go();
|
||||
}
|
||||
|
@ -14,18 +14,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
@ -43,7 +43,7 @@ class ImageView : public BView {
|
||||
public:
|
||||
ImageView(BRect rect, const char *name);
|
||||
~ImageView();
|
||||
|
||||
|
||||
void AttachedToWindow();
|
||||
void Draw(BRect rect);
|
||||
void FrameResized(float width, float height);
|
||||
@ -51,24 +51,24 @@ public:
|
||||
void MouseMoved(BPoint point, uint32 state, const BMessage *pmsg);
|
||||
void MouseUp(BPoint point);
|
||||
void MessageReceived(BMessage *pmsg);
|
||||
|
||||
|
||||
void SetImage(BMessage *pmsg);
|
||||
bool HasImage() { return fpbitmap ? true : false; };
|
||||
|
||||
|
||||
void FirstPage();
|
||||
void LastPage();
|
||||
void NextPage();
|
||||
void PrevPage();
|
||||
|
||||
|
||||
private:
|
||||
void UpdateInfoWindow(const BPath &path, BMessage &ioExtension,
|
||||
const translator_info &info, BTranslatorRoster *proster);
|
||||
void ReDraw();
|
||||
void AdjustScrollBars();
|
||||
void SaveImageAtDropLocation(BMessage *pmsg);
|
||||
|
||||
|
||||
BTranslatorRoster *SelectTranslatorRoster(BTranslatorRoster &roster);
|
||||
|
||||
|
||||
entry_ref fcurrentRef;
|
||||
int32 fdocumentIndex;
|
||||
int32 fdocumentCount;
|
||||
|
@ -138,12 +138,12 @@ ImageWindow::MessageReceived(BMessage *pmsg)
|
||||
case M_SAVE_IMAGE:
|
||||
if (fpimageView->HasImage()) {
|
||||
BAlert *palert = new BAlert(NULL,
|
||||
B_TRANSLATE("Save feature not implemented yet."),
|
||||
B_TRANSLATE("Save feature not implemented yet."),
|
||||
B_TRANSLATE("Bummer"));
|
||||
palert->Go();
|
||||
} else {
|
||||
BAlert *palert = new BAlert(NULL,
|
||||
B_TRANSLATE("No image available to save."),
|
||||
B_TRANSLATE("No image available to save."),
|
||||
B_TRANSLATE("OK"));
|
||||
palert->Go();
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
// ImageWindow.h
|
||||
//
|
||||
// BWindow class for displaying an image. Uses ImageView class for its
|
||||
// view.
|
||||
// view.
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2003 OpenBeOS Project
|
||||
@ -13,18 +13,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
@ -42,7 +42,7 @@ public:
|
||||
~ImageWindow();
|
||||
void MessageReceived(BMessage *pmsg);
|
||||
bool QuitRequested();
|
||||
|
||||
|
||||
private:
|
||||
BFilePanel *fpopenPanel;
|
||||
ImageView *fpimageView;
|
||||
|
@ -5,7 +5,7 @@
|
||||
// InfoWindow.cpp
|
||||
//
|
||||
// BWindow class for displaying information about the currently open
|
||||
// document
|
||||
// document
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2003 OpenBeOS Project
|
||||
@ -13,18 +13,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
@ -42,22 +42,22 @@ InfoWindow::InfoWindow(BRect rect, const char *name, const char *text)
|
||||
BRect rctframe = Bounds();
|
||||
rctframe.right -= B_V_SCROLL_BAR_WIDTH;
|
||||
rctframe.bottom -= B_H_SCROLL_BAR_HEIGHT;
|
||||
|
||||
|
||||
BRect rcttext = rctframe;
|
||||
rcttext.OffsetTo(B_ORIGIN);
|
||||
|
||||
|
||||
fptextView = new BTextView(rctframe, "infoview", rcttext,
|
||||
B_FOLLOW_ALL_SIDES, B_WILL_DRAW | B_PULSE_NEEDED);
|
||||
|
||||
|
||||
BScrollView *psv;
|
||||
AddChild(psv = new BScrollView("infoscrollview", fptextView,
|
||||
B_FOLLOW_ALL_SIDES, 0, true, true));
|
||||
fptextView->MakeEditable(false);
|
||||
//fptextView->MakeResizable(true);
|
||||
fptextView->SetText(text);
|
||||
|
||||
|
||||
SetSizeLimits(100, 10000, 100, 10000);
|
||||
|
||||
|
||||
Show();
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ void
|
||||
InfoWindow::FrameResized(float width, float height)
|
||||
{
|
||||
BRect rcttext = fptextView->TextRect();
|
||||
|
||||
|
||||
rcttext.right = rcttext.left + (width - B_V_SCROLL_BAR_WIDTH);
|
||||
fptextView->SetTextRect(rcttext);
|
||||
}
|
||||
@ -93,7 +93,7 @@ InfoWindow::MessageReceived(BMessage *pmsg)
|
||||
fptextView->SetText(bstr.String());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
BWindow::MessageReceived(pmsg);
|
||||
break;
|
||||
|
@ -5,7 +5,7 @@
|
||||
// InfoWindow.h
|
||||
//
|
||||
// BWindow class for displaying information about the currently open
|
||||
// document
|
||||
// document
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2003 OpenBeOS Project
|
||||
@ -13,18 +13,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
@ -43,7 +43,7 @@ public:
|
||||
void FrameResized(float width, float height);
|
||||
void MessageReceived(BMessage *pmsg);
|
||||
void Quit();
|
||||
|
||||
|
||||
private:
|
||||
BTextView *fptextView;
|
||||
};
|
||||
|
@ -13,18 +13,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
@ -44,6 +44,6 @@ StatusCheck::operator=(status_t ret)
|
||||
{
|
||||
if (ret != B_OK)
|
||||
throw StatusNotOKException();
|
||||
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -13,18 +13,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
// BTranslatorItem.cpp
|
||||
//
|
||||
// BStringItem based class for using a list of Translators in a BListView
|
||||
// BStringItem based class for using a list of Translators in a BListView
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2003 OpenBeOS Project
|
||||
@ -12,18 +12,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
@ -35,7 +35,7 @@ BTranslatorItem::BTranslatorItem(const char *text, const char *path, int32 group
|
||||
{
|
||||
fpath.SetTo(path);
|
||||
fgroup = UNKNOWN_GROUP;
|
||||
|
||||
|
||||
if (group == SYSTEM_TRANSLATOR || group == USER_TRANSLATOR)
|
||||
fgroup = group;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
// BTranslatorItem.h
|
||||
//
|
||||
// BStringItem based class for using a list of Translators in a BListView
|
||||
// BStringItem based class for using a list of Translators in a BListView
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2003 OpenBeOS Project
|
||||
@ -12,18 +12,18 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
@ -44,10 +44,10 @@ enum {
|
||||
class BTranslatorItem : public BStringItem {
|
||||
public:
|
||||
BTranslatorItem(const char *text, const char *path, int32 group);
|
||||
|
||||
|
||||
const char *Path() const;
|
||||
int32 Group() const;
|
||||
|
||||
|
||||
private:
|
||||
BString fpath;
|
||||
int32 fgroup;
|
||||
|
Loading…
Reference in New Issue
Block a user