libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / apps / resedit / InternalEditors.h
blobe244bca2b340c056a9fb1064e5977193b3dce622
1 /*
2 * Copyright (c) 2005-2010, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
5 * Author:
6 * DarkWyrm <darkwyrm@gmail.com>
7 */
8 #ifndef INTERNALEDITORS_H
9 #define INTERNALEDITORS_H
11 #include <Button.h>
12 #include <TextControl.h>
13 #include <StringView.h>
14 #include <View.h>
16 #include "Editor.h"
18 class StringEditView : public BView
20 public:
21 StringEditView(const BRect &frame);
22 ~StringEditView(void);
24 void AttachedToWindow(void);
26 const char * GetID(void) const { return fIDBox->Text(); }
27 void SetID(const char *idstring) { fIDBox->SetText(idstring); }
29 const char * GetName(void) const { return fNameBox->Text(); }
30 void SetName(const char *name) { fNameBox->SetText(name); }
32 const char * GetValue(void) const { return fValueView->Text(); }
33 void SetValue(const char *value) { fValueView->SetText(value); }
35 void EnableID(const bool &value) { fIDBox->SetEnabled(value); }
36 bool IsIDEnabled(void) const { return fIDBox->IsEnabled(); }
38 float GetPreferredWidth(void) const;
39 float GetPreferredHeight(void) const;
41 private:
42 BTextControl *fIDBox,
43 *fNameBox;
44 BTextView *fValueView;
46 BButton *fCancel,
47 *fOK;
50 class DoubleEditor : public Editor
52 public:
53 DoubleEditor(const BRect &frame, ResourceData *data,
54 BHandler *owner);
55 void MessageReceived(BMessage *msg);
57 private:
58 StringEditView *fView;
61 class StringEditor : public Editor
63 public:
64 StringEditor(const BRect &frame, ResourceData *data,
65 BHandler *owner);
66 void MessageReceived(BMessage *msg);
68 private:
69 StringEditView *fView;
72 class BitmapView;
74 class ImageEditor : public Editor
76 public:
77 ImageEditor(const BRect &frame, ResourceData *data,
78 BHandler *owner);
79 ~ImageEditor(void);
80 void MessageReceived(BMessage *msg);
81 void FrameResized(float w, float h);
83 private:
84 BTextControl *fIDBox;
85 BTextControl *fNameBox;
87 BButton *fOK,
88 *fCancel;
90 BBitmap *fImage;
91 BitmapView *fImageView;
94 #endif