Let's just use 1 PD_API header
This commit is contained in:
@@ -25,7 +25,7 @@ SOFTWARE.
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
PD_UI7_API void Button::HandleInput() {
|
||||
PD_API void Button::HandleInput() {
|
||||
/// Ensure to only check input once
|
||||
if (inp_done) {
|
||||
return;
|
||||
@@ -46,7 +46,7 @@ PD_UI7_API void Button::HandleInput() {
|
||||
//}
|
||||
inp_done = true;
|
||||
}
|
||||
PD_UI7_API void Button::Draw() {
|
||||
PD_API void Button::Draw() {
|
||||
// Assert(io.get() && list.get(), "Did you run Container::Init correctly?");
|
||||
// io->Ren->OnScreen(screen);
|
||||
list->PathRect(FinalPos(), FinalPos() + size, io->FrameRounding);
|
||||
@@ -57,7 +57,7 @@ PD_UI7_API void Button::Draw() {
|
||||
list->LayerDown();
|
||||
}
|
||||
|
||||
PD_UI7_API void Button::Update() {
|
||||
PD_API void Button::Update() {
|
||||
// Assert(io.get(), "Did you run Container::Init correctly?");
|
||||
this->SetSize(tdim + io->FramePadding);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ SOFTWARE.
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
PD_UI7_API void Checkbox::HandleInput() {
|
||||
PD_API void Checkbox::HandleInput() {
|
||||
/// Ensure to only check input once
|
||||
if (inp_done) {
|
||||
return;
|
||||
@@ -45,7 +45,7 @@ PD_UI7_API void Checkbox::HandleInput() {
|
||||
//}
|
||||
inp_done = true;
|
||||
}
|
||||
PD_UI7_API void Checkbox::Draw() {
|
||||
PD_API void Checkbox::Draw() {
|
||||
// Assert(list.get() && io.get(), "Did you run Container::Init correctly?");
|
||||
// io->Ren->OnScreen(screen);
|
||||
list->PathRect(FinalPos(), FinalPos() + cbs, io->FrameRounding);
|
||||
@@ -59,7 +59,7 @@ PD_UI7_API void Checkbox::Draw() {
|
||||
label, io->Theme->Get(UI7Color_Text));
|
||||
}
|
||||
|
||||
PD_UI7_API void Checkbox::Update() {
|
||||
PD_API void Checkbox::Update() {
|
||||
// Assert(io.get(), "Did you run Container::Init correctly?");
|
||||
cbs = io->ItemRowHeight;
|
||||
this->SetSize(cbs + fvec2(tdim.x + io->ItemSpace.x, 0));
|
||||
|
||||
@@ -26,7 +26,7 @@ SOFTWARE.
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
PD_UI7_API void ColorEdit::HandleInput() {
|
||||
PD_API void ColorEdit::HandleInput() {
|
||||
/// Ensure to only check input once
|
||||
if (inp_done) {
|
||||
return;
|
||||
@@ -42,7 +42,7 @@ PD_UI7_API void ColorEdit::HandleInput() {
|
||||
//}
|
||||
inp_done = true;
|
||||
}
|
||||
PD_UI7_API void ColorEdit::Draw() {
|
||||
PD_API void ColorEdit::Draw() {
|
||||
// Assert(io.get() && list.get(), "Did you run Container::Init correctly?");
|
||||
// io->Ren->OnScreen(screen);
|
||||
list->PathRect(FinalPos(), FinalPos() + io->ItemRowHeight, io->FrameRounding);
|
||||
@@ -90,7 +90,7 @@ PD_UI7_API void ColorEdit::Draw() {
|
||||
}
|
||||
}
|
||||
|
||||
PD_UI7_API void ColorEdit::Update() {
|
||||
PD_API void ColorEdit::Update() {
|
||||
// Assert(io.get(), "Did you run Container::Init correctly?");
|
||||
this->SetSize(
|
||||
fvec2(tdim.x + io->ItemSpace.x + io->ItemRowHeight, io->ItemRowHeight));
|
||||
|
||||
@@ -25,7 +25,7 @@ SOFTWARE.
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
PD_UI7_API void Container::HandleScrolling(fvec2 scrolling, fvec4 viewport) {
|
||||
PD_API void Container::HandleScrolling(fvec2 scrolling, fvec4 viewport) {
|
||||
if (last_use != 0 && OS::GetTime() - last_use > 5000) {
|
||||
rem = true;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ PD_UI7_API void Container::HandleScrolling(fvec2 scrolling, fvec4 viewport) {
|
||||
viewport.y + viewport.w));
|
||||
}
|
||||
|
||||
PD_UI7_API void Container::HandleInternalInput() {
|
||||
PD_API void Container::HandleInternalInput() {
|
||||
/** Requires Handle Scrolling First */
|
||||
}
|
||||
} // namespace UI7
|
||||
|
||||
@@ -29,15 +29,15 @@ namespace PD {
|
||||
namespace UI7 {
|
||||
// Setup Supported Datatypes (Probably making this Object
|
||||
// header only to not care about datatype support)
|
||||
template class PD_UI7_API DragData<float>;
|
||||
template class PD_UI7_API DragData<int>;
|
||||
template class PD_UI7_API DragData<double>;
|
||||
template class PD_UI7_API DragData<u8>;
|
||||
template class PD_UI7_API DragData<u16>;
|
||||
template class PD_UI7_API DragData<u32>;
|
||||
template class PD_UI7_API DragData<u64>;
|
||||
template class PD_API DragData<float>;
|
||||
template class PD_API DragData<int>;
|
||||
template class PD_API DragData<double>;
|
||||
template class PD_API DragData<u8>;
|
||||
template class PD_API DragData<u16>;
|
||||
template class PD_API DragData<u32>;
|
||||
template class PD_API DragData<u64>;
|
||||
template <typename T>
|
||||
PD_UI7_API void DragData<T>::HandleInput() {
|
||||
PD_API void DragData<T>::HandleInput() {
|
||||
/// Ensure to only check input once
|
||||
if (inp_done) {
|
||||
return;
|
||||
@@ -69,7 +69,7 @@ PD_UI7_API void DragData<T>::HandleInput() {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
PD_UI7_API void DragData<T>::Draw() {
|
||||
PD_API void DragData<T>::Draw() {
|
||||
// Assert(io.get() && list.get(), "Did you run Container::Init correctly?");
|
||||
// io->Ren->OnScreen(screen);
|
||||
float off_x = 0.f;
|
||||
@@ -97,7 +97,7 @@ PD_UI7_API void DragData<T>::Draw() {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
PD_UI7_API void DragData<T>::Update() {
|
||||
PD_API void DragData<T>::Update() {
|
||||
// Assert(io.get(), "Did you run Container::Init correctly?");
|
||||
// Probably need to find a faster solution (caching sizes calculated here)
|
||||
float off_x = 0;
|
||||
|
||||
@@ -26,14 +26,14 @@ SOFTWARE.
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
PD_UI7_API void DynObj::Draw() { pRenFun(io, list, this); }
|
||||
PD_API void DynObj::Draw() { pRenFun(io, list, this); }
|
||||
|
||||
PD_UI7_API void DynObj::HandleInput() {
|
||||
PD_API void DynObj::HandleInput() {
|
||||
if (pInp) {
|
||||
pInp(io, this);
|
||||
}
|
||||
}
|
||||
|
||||
PD_UI7_API void DynObj::Update() {}
|
||||
PD_API void DynObj::Update() {}
|
||||
} // namespace UI7
|
||||
} // namespace PD
|
||||
@@ -25,7 +25,7 @@ SOFTWARE.
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
PD_UI7_API void Image::Draw() {
|
||||
PD_API void Image::Draw() {
|
||||
// Assert(io.get() && list.get(), "Did you run Container::Init correctly?");
|
||||
// Assert(img.get(), "Image is nullptr!");
|
||||
// io->Ren->OnScreen(screen);
|
||||
|
||||
@@ -25,7 +25,7 @@ SOFTWARE.
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
PD_UI7_API void Label::Draw() {
|
||||
PD_API void Label::Draw() {
|
||||
// Assert(io.get() && list.get(), "Did you run Container::Init correctly?");
|
||||
// io->Ren->OnScreen(screen);
|
||||
if (pCLipRectUsed) {
|
||||
@@ -38,7 +38,7 @@ PD_UI7_API void Label::Draw() {
|
||||
}
|
||||
}
|
||||
|
||||
PD_UI7_API void Label::Update() {
|
||||
PD_API void Label::Update() {
|
||||
/**
|
||||
* Todo: This is a hacky workaround
|
||||
* Needs proper optimisation
|
||||
|
||||
@@ -29,15 +29,15 @@ namespace PD {
|
||||
namespace UI7 {
|
||||
// Setup Supported Datatypes (Probably making this Object
|
||||
// header only to not care about datatype support)
|
||||
template class PD_UI7_API Slider<float>;
|
||||
template class PD_UI7_API Slider<int>;
|
||||
template class PD_UI7_API Slider<double>;
|
||||
template class PD_UI7_API Slider<u8>;
|
||||
template class PD_UI7_API Slider<u16>;
|
||||
template class PD_UI7_API Slider<u32>;
|
||||
template class PD_UI7_API Slider<u64>;
|
||||
template class PD_API Slider<float>;
|
||||
template class PD_API Slider<int>;
|
||||
template class PD_API Slider<double>;
|
||||
template class PD_API Slider<u8>;
|
||||
template class PD_API Slider<u16>;
|
||||
template class PD_API Slider<u32>;
|
||||
template class PD_API Slider<u64>;
|
||||
template <typename T>
|
||||
PD_UI7_API void Slider<T>::HandleInput() {
|
||||
PD_API void Slider<T>::HandleInput() {
|
||||
/// Ensure to only check input once
|
||||
if (inp_done) {
|
||||
return;
|
||||
@@ -66,7 +66,7 @@ PD_UI7_API void Slider<T>::HandleInput() {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
PD_UI7_API void Slider<T>::Draw() {
|
||||
PD_API void Slider<T>::Draw() {
|
||||
// Assert(io.get() && list.get(), "Did you run Container::Init correctly?");
|
||||
// io->Ren->OnScreen(screen);
|
||||
std::string p;
|
||||
@@ -93,7 +93,7 @@ PD_UI7_API void Slider<T>::Draw() {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
PD_UI7_API void Slider<T>::Update() {
|
||||
PD_API void Slider<T>::Update() {
|
||||
// Assert(io.get(), "Did you run Container::Init correctly?");
|
||||
// Probably need to find a faster solution (caching sizes calculated here)
|
||||
slw = std::clamp(static_cast<float>(width / max), 3.f, width);
|
||||
|
||||
Reference in New Issue
Block a user